summaryrefslogtreecommitdiff
path: root/nuttx/arch/sim
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-20 06:26:14 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-20 06:26:14 -0600
commit82183ccc3878f0c66959aa7653620bdbd15ef4e3 (patch)
tree1a7f0fba02136ab78b799a8ba60a894fb8951faf /nuttx/arch/sim
parentca545aa2d7239f5f769035c77d63d80409d7bc02 (diff)
downloadnuttx-82183ccc3878f0c66959aa7653620bdbd15ef4e3.tar.gz
nuttx-82183ccc3878f0c66959aa7653620bdbd15ef4e3.tar.bz2
nuttx-82183ccc3878f0c66959aa7653620bdbd15ef4e3.zip
Ethernet drivers: Use IFF_IS_IPv4 macro. Cannot rely on the EtherType being set correctly.
Diffstat (limited to 'nuttx/arch/sim')
-rw-r--r--nuttx/arch/sim/src/up_netdriver.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/arch/sim/src/up_netdriver.c b/nuttx/arch/sim/src/up_netdriver.c
index eec433ac2..7f40cabb4 100644
--- a/nuttx/arch/sim/src/up_netdriver.c
+++ b/nuttx/arch/sim/src/up_netdriver.c
@@ -181,7 +181,7 @@ void netdriver_loop(void)
/* Update the Ethernet header with the correct MAC address */
#ifdef CONFIG_NET_IPv6
- if (BUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(g_sim_dev.d_flags))
#endif
{
arp_out(&g_sim_dev);
@@ -213,7 +213,7 @@ void netdriver_loop(void)
#ifdef CONFIG_NET_IPv4
/* Update the Ethernet header with the correct MAC address */
- if (BUF->type == HTONS(ETHTYPE_IP))
+ if (IFF_IS_IPv4(g_sim_dev.d_flags))
{
arp_out(&g_sim_dev);
}