summaryrefslogtreecommitdiff
path: root/nuttx/drivers/net/vnet.c
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-21 11:36:33 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-21 11:36:33 -0600
commit926f204fe26a9798ef119dd3170c81b2d43175b3 (patch)
tree5b13afa47fe9b6cf8e1129d4a088b3e363c27357 /nuttx/drivers/net/vnet.c
parenta4aaf127457d1092916b2c4f87272c3471345ae3 (diff)
downloadpx4-nuttx-926f204fe26a9798ef119dd3170c81b2d43175b3.tar.gz
px4-nuttx-926f204fe26a9798ef119dd3170c81b2d43175b3.tar.bz2
px4-nuttx-926f204fe26a9798ef119dd3170c81b2d43175b3.zip
All Ethernet drivers (again): Missed one place where arp_out() is called and neighber_out() needs to be called
Diffstat (limited to 'nuttx/drivers/net/vnet.c')
-rw-r--r--nuttx/drivers/net/vnet.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/nuttx/drivers/net/vnet.c b/nuttx/drivers/net/vnet.c
index 3def6e8d1..6a61b7964 100644
--- a/nuttx/drivers/net/vnet.c
+++ b/nuttx/drivers/net/vnet.c
@@ -243,7 +243,30 @@ static int vnet_txpoll(struct net_driver_s *dev)
if (vnet->sk_dev.d_len > 0)
{
- arp_out(&vnet->sk_dev);
+ /* Look up the destination MAC address and add it to the Ethernet
+ * header.
+ */
+
+#ifdef CONFIG_NET_IPv4
+#ifdef CONFIG_NET_IPv6
+ if (IFF_IS_IPv4(vnet->sk_dev.d_flags))
+#endif
+ {
+ arp_out(&vnet->sk_dev);
+ }
+#endif /* CONFIG_NET_IPv4 */
+
+#ifdef CONFIG_NET_IPv6
+#ifdef CONFIG_NET_IPv4
+ else
+#endif
+ {
+ neighbor_out(&vnet->sk_dev);
+ }
+#endif /* CONFIG_NET_IPv6 */
+
+ /* Send the packet */
+
vnet_transmit(vnet);
/* Check if there is room in the device to hold another packet. If not,