icmpv6: Set the default gateway for the stateful dhcpv6.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
This commit is contained in:
parent
0329407d27
commit
c00ff58baa
net/icmpv6
@ -437,9 +437,12 @@ got_lladdr:
|
||||
nerr("ERROR: Failed send neighbor advertisement: %d\n", senderr);
|
||||
}
|
||||
|
||||
/* No off-link communications; No router address. */
|
||||
if (ret != -EADDRNOTAVAIL)
|
||||
{
|
||||
/* No off-link communications; No router address. */
|
||||
|
||||
net_ipv6addr_copy(dev->d_ipv6draddr, g_ipv6_unspecaddr);
|
||||
net_ipv6addr_copy(dev->d_ipv6draddr, g_ipv6_unspecaddr);
|
||||
}
|
||||
}
|
||||
|
||||
/* 5. Router Direction: The router provides direction to the node on how
|
||||
|
@ -455,6 +455,14 @@ void icmpv6_input(FAR struct net_driver_s *dev, unsigned int iplen)
|
||||
prefixopt);
|
||||
}
|
||||
|
||||
/* Set the router address for the stateful process. */
|
||||
|
||||
if ((adv->flags & ICMPv6_RADV_FLAG_M))
|
||||
{
|
||||
net_ipv6addr_copy(dev->d_ipv6draddr,
|
||||
ipv6->srcipaddr);
|
||||
}
|
||||
|
||||
/* Notify any waiting threads */
|
||||
|
||||
icmpv6_rnotify(dev, (adv->flags & ICMPv6_RADV_FLAG_M) ?
|
||||
|
Loading…
x
Reference in New Issue
Block a user