This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 31984286c5fbca199248f2fc396c6e3549f2bb6b Author: Marco Casaroli <[email protected]> AuthorDate: Thu Nov 26 06:26:45 2026 +0100 net/neighbor: Build without a link layer address. neighbor_match() copied dev->d_mac, but d_mac exists only with CONFIG_NET_ETHERNET, CONFIG_NET_6LOWPAN, CONFIG_NET_BLUETOOTH, CONFIG_NET_IEEE802154 or CONFIG_NET_TUN. neighbor_lookup.c is built for every IPv6 configuration, so an IPv6 build without one of these link layers (sim:rpproxy with CONFIG_NET_IPv6, for example) failed. Copy the address only if d_mac exists. netdev_lladdrsize() gives 0 for the other link layer types, so na_llsize is 0 there. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Marco Casaroli <[email protected]> --- net/neighbor/neighbor_lookup.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/net/neighbor/neighbor_lookup.c b/net/neighbor/neighbor_lookup.c index 0a160f4ac0a..3a6b2b45ba2 100644 --- a/net/neighbor/neighbor_lookup.c +++ b/net/neighbor/neighbor_lookup.c @@ -81,7 +81,12 @@ static int neighbor_match(FAR struct net_driver_s *dev, FAR void *arg) { info->ni_laddr->na_lltype = dev->d_lltype; info->ni_laddr->na_llsize = netdev_lladdrsize(dev); + +#if defined(CONFIG_NET_ETHERNET) || defined(CONFIG_NET_6LOWPAN) || \ + defined(CONFIG_NET_BLUETOOTH) || defined(CONFIG_NET_IEEE802154) || \ + defined(CONFIG_NET_TUN) memcpy(&info->ni_laddr->u, &dev->d_mac, info->ni_laddr->na_llsize); +#endif } /* Return success in any event */
