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:
Gregory Nutt
2015-01-20 15:52:25 -06:00
parent 10c7b1d5bf
commit 1ad73c52b1
21 changed files with 276 additions and 25 deletions
+13 -1
View File
@@ -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 */