diff --git a/net/devif/ipv4_input.c b/net/devif/ipv4_input.c index 8e35497fc7..e0227a1f99 100644 --- a/net/devif/ipv4_input.c +++ b/net/devif/ipv4_input.c @@ -207,11 +207,11 @@ int ipv4_input(FAR struct net_driver_s *dev) if ((ipv4->ipoffset[0] & 0x3f) != 0 || ipv4->ipoffset[1] != 0) { #ifdef CONFIG_NET_STATISTICS - g_netstats.ipv4.drop++; - g_netstats.ipv4.fragerr++; + g_netstats.ipv4.drop++; + g_netstats.ipv4.fragerr++; #endif - nwarn("WARNING: IP fragment dropped\n"); - goto drop; + nwarn("WARNING: IP fragment dropped\n"); + goto drop; } /* Get the destination IP address in a friendlier form */ @@ -314,6 +314,7 @@ int ipv4_input(FAR struct net_driver_s *dev) } } #ifdef CONFIG_NET_ICMP + /* In other cases, the device must be assigned a non-zero IP address. */ else if (net_ipv4addr_cmp(dev->d_ipaddr, INADDR_ANY)) diff --git a/net/devif/ipv6_input.c b/net/devif/ipv6_input.c index 5d56d83248..168cffdbe6 100644 --- a/net/devif/ipv6_input.c +++ b/net/devif/ipv6_input.c @@ -391,8 +391,8 @@ int ipv6_input(FAR struct net_driver_s *dev) { #ifdef CONFIG_NET_IPFORWARD_BROADCAST - /* Packets sent to ffx0 are reserved, ffx1 are interface-local, and ffx2 - * are interface-local, and therefore, should not be forwarded + /* Packets sent to ffx0 are reserved, ffx1 are interface-local, and + * ffx2 are interface-local, and therefore, should not be forwarded */ if ((ipv6->destipaddr[0] & HTONS(0xff0f) != HTONS(0xff00)) && @@ -435,9 +435,11 @@ int ipv6_input(FAR struct net_driver_s *dev) #endif if (nxthdr != IP_PROTO_UDP) { - /* Not destined for us and not forwardable... drop the packet. */ + /* Not destined for us and not forwardable... + * drop the packet. + */ - nwarn("WARNING: Not destined for us; not forwardable... Dropping!\n"); + nwarn("WARNING: Not destined for us... Dropping!\n"); goto drop; } }