mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-06-16 09:53:45 +08:00
netif: Verify NETIF_MAX_HWADDR_LEN on netif add
This commit is contained in:
@@ -388,6 +388,8 @@ netif_add(struct netif *netif,
|
|||||||
if (init(netif) != ERR_OK) {
|
if (init(netif) != ERR_OK) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
LWIP_ASSERT("netif->hwaddr_len <= NETIF_MAX_HWADDR_LEN",
|
||||||
|
(netif->hwaddr_len <= NETIF_MAX_HWADDR_LEN));
|
||||||
#if LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES
|
#if LWIP_IPV6 && LWIP_ND6_ALLOW_RA_UPDATES
|
||||||
/* Initialize the MTU for IPv6 to the one set by the netif driver.
|
/* Initialize the MTU for IPv6 to the one set by the netif driver.
|
||||||
This can be updated later by RA. */
|
This can be updated later by RA. */
|
||||||
|
|||||||
Reference in New Issue
Block a user