mirror of
https://github.com/apache/nuttx.git
synced 2026-05-31 14:27:37 +08:00
Networking: Modify all Ethernet drivers: Do neighbor look-up on all outgoing IPv6 packs in order to properly set the destination link layer address.
This commit is contained in:
+13
-1
@@ -1412,6 +1412,12 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
|
||||
{
|
||||
arp_out(&priv->dev);
|
||||
}
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
else
|
||||
{
|
||||
neighbor_out(&priv->dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* And send the packet */
|
||||
|
||||
@@ -1435,13 +1441,19 @@ static void enc_rxdispatch(FAR struct enc_driver_s *priv)
|
||||
|
||||
if (priv->dev.d_len > 0)
|
||||
{
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
/* Update the Ethernet header with the correct MAC address */
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
if (IFF_IS_IPv4(priv->dev.d_flags))
|
||||
{
|
||||
arp_out(&priv->dev);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
{
|
||||
neighbor_out(&priv->dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* And send the packet */
|
||||
|
||||
Reference in New Issue
Block a user