summaryrefslogtreecommitdiff
path: root/nuttx/net/devif/ipv4_input.c
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/net/devif/ipv4_input.c')
-rw-r--r--nuttx/net/devif/ipv4_input.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/nuttx/net/devif/ipv4_input.c b/nuttx/net/devif/ipv4_input.c
index 394b220a7..fcdf1efd3 100644
--- a/nuttx/net/devif/ipv4_input.c
+++ b/nuttx/net/devif/ipv4_input.c
@@ -85,6 +85,8 @@
#include <debug.h>
#include <string.h>
+#include <net/if.h>
+
#include <nuttx/net/netconfig.h>
#include <nuttx/net/netdev.h>
#include <nuttx/net/netstats.h>
@@ -220,7 +222,9 @@ static uint8_t devif_reassembly(void)
{
g_reassembly_bitmap[i] = 0xff;
}
- g_reassembly_bitmap[(offset + len) / (8 * 8)] |= ~g_bitmap_bits[((offset + len) / 8 ) & 7];
+
+ g_reassembly_bitmap[(offset + len) / (8 * 8)] |=
+ ~g_bitmap_bits[((offset + len) / 8 ) & 7];
}
/* If this fragment has the More Fragments flag set to zero, we know that
@@ -450,10 +454,14 @@ int ipv4_input(FAR struct net_driver_s *dev)
goto drop;
}
- /* Everything looks good so far. Now process the incoming packet
- * according to the protocol.
+ /* Make sure that all packet processing logic knows that there is an IPv4
+ * packet in the device buffer.
*/
+ IFF_SET_IPv4(dev->d_flags);
+
+ /* Now process the incoming packet according to the protocol. */
+
switch (pbuf->proto)
{
#ifdef CONFIG_NET_TCP