mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-25 00:14:02 +00:00
netif_add: check that the new netif is not already added
This commit is contained in:
parent
600527dde7
commit
c881c48eed
@ -379,6 +379,7 @@ netif_add(struct netif *netif,
|
||||
}
|
||||
num_netifs = 0;
|
||||
for (netif2 = netif_list; netif2 != NULL; netif2 = netif2->next) {
|
||||
LWIP_ASSERT("netif already added", netif2 != netif);
|
||||
num_netifs++;
|
||||
LWIP_ASSERT("too many netifs, max. supported number is 255", num_netifs <= 255);
|
||||
if (netif2->num == netif->num) {
|
||||
|
Loading…
Reference in New Issue
Block a user