diff --git a/net/icmpv6/icmpv6_neighbor.c b/net/icmpv6/icmpv6_neighbor.c index 991612463d2..a899c196e71 100644 --- a/net/icmpv6/icmpv6_neighbor.c +++ b/net/icmpv6/icmpv6_neighbor.c @@ -257,6 +257,11 @@ int icmpv6_neighbor(FAR struct net_driver_s *dev, net_ipv6addr_copy(lookup, dev->d_ipv6draddr); #endif + + if (net_is_addr_unspecified(lookup)) + { + return -EHOSTUNREACH; + } } /* No ARP packet if this device do not support ARP */ diff --git a/net/neighbor/neighbor_ethernet_out.c b/net/neighbor/neighbor_ethernet_out.c index f3b0870c879..1e753a76785 100644 --- a/net/neighbor/neighbor_ethernet_out.c +++ b/net/neighbor/neighbor_ethernet_out.c @@ -135,6 +135,12 @@ void neighbor_ethernet_out(FAR struct net_driver_s *dev) net_ipv6addr_copy(ipaddr, dev->d_ipv6draddr); #endif + + if (net_is_addr_unspecified(ipaddr)) + { + dev->d_len = 0; + return; + } } else {