diff --git a/src/core/netif.c b/src/core/netif.c index f7134db3..87ba15bb 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -1409,6 +1409,9 @@ netif_find(const char *name) */ void netif_add_ext_callback(netif_ext_callback_t* callback, netif_ext_callback_fn fn) { + LWIP_ASSERT("callback must be != NULL", callback != NULL); + LWIP_ASSERT("fn must be != NULL", fn != NULL); + if (callback->callback_fn != NULL) { return; /* already registered */ } @@ -1428,6 +1431,8 @@ void netif_add_ext_callback(netif_ext_callback_t* callback, netif_ext_callback_f */ void netif_invoke_ext_callback(struct netif* netif, netif_nsc_reason_t reason, u16_t num, const void* arg) { + LWIP_ASSERT("netif must be != NULL", netif != NULL); + netif_ext_callback_t* callback = ext_callback; while (callback != NULL) diff --git a/src/include/lwip/netif.h b/src/include/lwip/netif.h index afee24c0..519acf13 100644 --- a/src/include/lwip/netif.h +++ b/src/include/lwip/netif.h @@ -507,7 +507,7 @@ struct netif* netif_get_by_index(u8_t idx); /** * @ingroup netif - * Extended netif callback reasons enumeration. + * Extended netif status callback (NSC) reasons enumeration. * May be extended in the future! */ typedef enum