From e9fa96258b3968e0ff407efb54f5cc48079e8ff0 Mon Sep 17 00:00:00 2001 From: Anthony Merlino Date: Wed, 18 Oct 2017 11:08:56 -0600 Subject: [PATCH] net/: Fix some build issues noted when both IPv4 and IPv6 are enabled. --- net/ipforward/ipfwd_dropstats.c | 4 ++-- net/ipforward/ipfwd_forward.c | 6 +++--- net/neighbor/neighbor_dumpentry.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/net/ipforward/ipfwd_dropstats.c b/net/ipforward/ipfwd_dropstats.c index b79d643587..b856f7016a 100644 --- a/net/ipforward/ipfwd_dropstats.c +++ b/net/ipforward/ipfwd_dropstats.c @@ -151,7 +151,7 @@ void ipv4_dropstats(FAR struct ipv4_hdr_s *ipv4) { int ret; - ret = proto_dropstats(ipv6->ipv4); + ret = proto_dropstats(ipv4->proto); if (ret < 0) { g_netstats.ipv4.protoerr++; @@ -179,7 +179,7 @@ void ipfwd_dropstats(FAR struct forward_s *fwd) { #ifdef CONFIG_NET_IPv4 #ifdef CONFIG_NET_IPv6 - if (fwd->domain == PF_INET) + if (fwd->f_domain == PF_INET) #endif { ipv4_dropstats((FAR struct ipv4_hdr_s *)fwd->f_iob->io_data); diff --git a/net/ipforward/ipfwd_forward.c b/net/ipforward/ipfwd_forward.c index 1b066ba4f1..67d0ce1c26 100644 --- a/net/ipforward/ipfwd_forward.c +++ b/net/ipforward/ipfwd_forward.c @@ -158,8 +158,8 @@ static inline bool ipfwd_addrchk(FAR struct forward_s *fwd) #endif { #if !defined(CONFIG_NET_ARP_IPIN) && !defined(CONFIG_NET_ARP_SEND) - FAR stuct ipv4_hdr_s *ipv4 = (FAR stuct ipv4_hdr_s *)fwd->f_iob->io_data; - return (arp_find(ipv4->destipaddr) != NULL); + FAR struct ipv4_hdr_s *ipv4 = (FAR struct ipv4_hdr_s *)fwd->f_iob->io_data; + return (arp_find(*(in_addr_t *)ipv4->destipaddr) != NULL); #else return true; #endif @@ -172,7 +172,7 @@ static inline bool ipfwd_addrchk(FAR struct forward_s *fwd) #endif { #if !defined(CONFIG_NET_ICMPv6_NEIGHBOR) - FAR stuct ipv6_hdr_s *ipv4 = (FAR stuct ipv6_hdr_s *)fwd->f_iob->io_data; + FAR struct ipv6_hdr_s *ipv4 = (FAR struct ipv6_hdr_s *)fwd->f_iob->io_data; return (neighbor_findentry(ipv6->destipaddr) != NULL); #else return true; diff --git a/net/neighbor/neighbor_dumpentry.c b/net/neighbor/neighbor_dumpentry.c index 0a710b7e2a..0a457ef4ff 100644 --- a/net/neighbor/neighbor_dumpentry.c +++ b/net/neighbor/neighbor_dumpentry.c @@ -140,7 +140,7 @@ void neighbor_dumpentry(FAR const char *msg, #ifdef CONFIG_NET_ETHERNET #ifdef CONFIG_NET_6LOWPAN - if (neighbor->ne_addr.u.na_lltype == NET_LL_ETHERNET) + if (neighbor->ne_addr.na_lltype == NET_LL_ETHERNET) #endif { neighbor_dump_address(neighbor->ne_addr.u.na_ethernet.ether_addr_octet,