This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 179ac5a64d72c29bb900c693fda134cdd09f1a5d Author: Marco Casaroli <[email protected]> AuthorDate: Sat Nov 21 17:06:52 2026 +0100 net/neighbor: Drop the IPv6 packet when no link address is known. With CONFIG_NET_IPv6 and no ICMPv6, neighbor_ethernet_out() cannot send a Neighbor Solicitation. When the destination is not in the Neighbor Table, it calls DEBUGPANIC(). A program reaches this with connect() or sendto() to any IPv6 address that is not in the table, so one system call stops the system. Without assertions, the function returns with d_len set and the driver sends the frame with the wrong Ethernet header. Drop the packet (d_len = 0), as the function already does when no router is known. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- net/neighbor/neighbor_ethernet_out.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/neighbor/neighbor_ethernet_out.c b/net/neighbor/neighbor_ethernet_out.c index adf9fbebc0b..7adea0dbac0 100644 --- a/net/neighbor/neighbor_ethernet_out.c +++ b/net/neighbor/neighbor_ethernet_out.c @@ -172,10 +172,10 @@ void neighbor_ethernet_out(FAR struct net_driver_s *dev) icmpv6_solicit(dev, ipaddr); #else - /* What to do here? We need the laddr, but no way to get it. */ + /* No Neighbor Solicitation without ICMPv6: drop the packet */ nerr("ERROR: IPv6 needs link layer address for ethernet.\n"); - DEBUGPANIC(); + dev->d_len = 0; return; #endif }
