net/: Fix some build issues noted when both IPv4 and IPv6 are enabled.

This commit is contained in:
Anthony Merlino 2017-10-18 11:08:56 -06:00 committed by Gregory Nutt
parent d29cb09da3
commit e9fa96258b
3 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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;

View File

@ -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,