mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 13:13:08 +08:00
icmpv6_neighbor: Simply skip IPv6 conflict detection on L3 Nic
Otherwise, the IP address is always considered to conflict, and the ipv6 address cannot be effectively obtained. Later we will look at how to perform conflict detection on L3 network cards Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
@@ -340,17 +340,21 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev)
|
||||
* method must be employed.
|
||||
*/
|
||||
|
||||
ret = icmpv6_neighbor(dev, lladdr);
|
||||
if (ret >= 0)
|
||||
if (dev->d_lltype == NET_LL_ETHERNET ||
|
||||
dev->d_lltype == NET_LL_IEEE80211)
|
||||
{
|
||||
/* Hmmm... someone else responded to our Neighbor Solicitation. We
|
||||
* have no back-up plan in place. Just bail.
|
||||
*/
|
||||
ret = icmpv6_neighbor(dev, lladdr);
|
||||
if (ret >= 0)
|
||||
{
|
||||
/* Hmmm... someone else responded to our Neighbor Solicitation. We
|
||||
* have no back-up plan in place. Just bail.
|
||||
*/
|
||||
|
||||
nerr("ERROR: IP conflict\n");
|
||||
nerr("ERROR: IP conflict\n");
|
||||
|
||||
net_unlock();
|
||||
return -EEXIST;
|
||||
net_unlock();
|
||||
return -EEXIST;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user