Commit e32ea44c authored by Andreas Roeseler's avatar Andreas Roeseler Committed by David S. Miller

icmp: fix lib conflict with trinity

Including <linux/in.h> and <netinet/in.h> in the dependencies breaks
compilation of trinity due to multiple definitions. <linux/in.h> is only
used in <linux/icmp.h> to provide the definition of the struct in_addr,
but this can be substituted out by using the datatype __be32.
Signed-off-by: default avatarAndreas Roeseler <andreas.a.roeseler@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 118de610
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/types.h> #include <linux/types.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <linux/in.h>
#include <linux/if.h> #include <linux/if.h>
#include <linux/in6.h> #include <linux/in6.h>
...@@ -154,7 +153,7 @@ struct icmp_ext_echo_iio { ...@@ -154,7 +153,7 @@ struct icmp_ext_echo_iio {
struct { struct {
struct icmp_ext_echo_ctype3_hdr ctype3_hdr; struct icmp_ext_echo_ctype3_hdr ctype3_hdr;
union { union {
struct in_addr ipv4_addr; __be32 ipv4_addr;
struct in6_addr ipv6_addr; struct in6_addr ipv6_addr;
} ip_addr; } ip_addr;
} addr; } addr;
......
...@@ -1059,7 +1059,7 @@ static bool icmp_echo(struct sk_buff *skb) ...@@ -1059,7 +1059,7 @@ static bool icmp_echo(struct sk_buff *skb)
if (ident_len != sizeof(iio->ident.addr.ctype3_hdr) + if (ident_len != sizeof(iio->ident.addr.ctype3_hdr) +
sizeof(struct in_addr)) sizeof(struct in_addr))
goto send_mal_query; goto send_mal_query;
dev = ip_dev_find(net, iio->ident.addr.ip_addr.ipv4_addr.s_addr); dev = ip_dev_find(net, iio->ident.addr.ip_addr.ipv4_addr);
break; break;
#if IS_ENABLED(CONFIG_IPV6) #if IS_ENABLED(CONFIG_IPV6)
case ICMP_AFI_IP6: case ICMP_AFI_IP6:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment