From 0f8331d47b21a24e7ed4542d42cffe4fab5e4dea Mon Sep 17 00:00:00 2001 From: Erik Ekman Date: Mon, 1 Jun 2026 21:45:51 +0200 Subject: [PATCH] netif: Verify NETIF_MAX_HWADDR_LEN on netif add --- src/core/netif.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/netif.c b/src/core/netif.c index 98e0553f..32d0c851 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -388,6 +388,8 @@ netif_add(struct netif *netif, if (init(netif) != ERR_OK) { 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 /* Initialize the MTU for IPv6 to the one set by the netif driver. This can be updated later by RA. */