net/: Fix some build issues noted when both IPv4 and IPv6 are enabled.
This commit is contained in:
parent
d29cb09da3
commit
e9fa96258b
@ -151,7 +151,7 @@ void ipv4_dropstats(FAR struct ipv4_hdr_s *ipv4)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
ret = proto_dropstats(ipv6->ipv4);
|
ret = proto_dropstats(ipv4->proto);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
g_netstats.ipv4.protoerr++;
|
g_netstats.ipv4.protoerr++;
|
||||||
@ -179,7 +179,7 @@ void ipfwd_dropstats(FAR struct forward_s *fwd)
|
|||||||
{
|
{
|
||||||
#ifdef CONFIG_NET_IPv4
|
#ifdef CONFIG_NET_IPv4
|
||||||
#ifdef CONFIG_NET_IPv6
|
#ifdef CONFIG_NET_IPv6
|
||||||
if (fwd->domain == PF_INET)
|
if (fwd->f_domain == PF_INET)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
ipv4_dropstats((FAR struct ipv4_hdr_s *)fwd->f_iob->io_data);
|
ipv4_dropstats((FAR struct ipv4_hdr_s *)fwd->f_iob->io_data);
|
||||||
|
@ -158,8 +158,8 @@ static inline bool ipfwd_addrchk(FAR struct forward_s *fwd)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if !defined(CONFIG_NET_ARP_IPIN) && !defined(CONFIG_NET_ARP_SEND)
|
#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;
|
FAR struct ipv4_hdr_s *ipv4 = (FAR struct ipv4_hdr_s *)fwd->f_iob->io_data;
|
||||||
return (arp_find(ipv4->destipaddr) != NULL);
|
return (arp_find(*(in_addr_t *)ipv4->destipaddr) != NULL);
|
||||||
#else
|
#else
|
||||||
return true;
|
return true;
|
||||||
#endif
|
#endif
|
||||||
@ -172,7 +172,7 @@ static inline bool ipfwd_addrchk(FAR struct forward_s *fwd)
|
|||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#if !defined(CONFIG_NET_ICMPv6_NEIGHBOR)
|
#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);
|
return (neighbor_findentry(ipv6->destipaddr) != NULL);
|
||||||
#else
|
#else
|
||||||
return true;
|
return true;
|
||||||
|
@ -140,7 +140,7 @@ void neighbor_dumpentry(FAR const char *msg,
|
|||||||
|
|
||||||
#ifdef CONFIG_NET_ETHERNET
|
#ifdef CONFIG_NET_ETHERNET
|
||||||
#ifdef CONFIG_NET_6LOWPAN
|
#ifdef CONFIG_NET_6LOWPAN
|
||||||
if (neighbor->ne_addr.u.na_lltype == NET_LL_ETHERNET)
|
if (neighbor->ne_addr.na_lltype == NET_LL_ETHERNET)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
neighbor_dump_address(neighbor->ne_addr.u.na_ethernet.ether_addr_octet,
|
neighbor_dump_address(neighbor->ne_addr.u.na_ethernet.ether_addr_octet,
|
||||||
|
Loading…
Reference in New Issue
Block a user