* [PATCH net-next] icmp: fix lib conflict with trinity
@ 2021-06-03 21:22 Andreas Roeseler
2021-06-03 22:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Roeseler @ 2021-06-03 21:22 UTC (permalink / raw)
To: netdev
Cc: davem, dsahern, kuba, willemdebrujin.kernel, fweimer, Andreas Roeseler
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: Andreas Roeseler <andreas.a.roeseler@gmail.com>
---
include/uapi/linux/icmp.h | 3 +--
net/ipv4/icmp.c | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/uapi/linux/icmp.h b/include/uapi/linux/icmp.h
index c1da8244c5e1..163c0998aec9 100644
--- a/include/uapi/linux/icmp.h
+++ b/include/uapi/linux/icmp.h
@@ -20,7 +20,6 @@
#include <linux/types.h>
#include <asm/byteorder.h>
-#include <linux/in.h>
#include <linux/if.h>
#include <linux/in6.h>
@@ -154,7 +153,7 @@ struct icmp_ext_echo_iio {
struct {
struct icmp_ext_echo_ctype3_hdr ctype3_hdr;
union {
- struct in_addr ipv4_addr;
+ __be32 ipv4_addr;
struct in6_addr ipv6_addr;
} ip_addr;
} addr;
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 7b6931a4d775..2e09d62d59e3 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -1059,7 +1059,7 @@ static bool icmp_echo(struct sk_buff *skb)
if (ident_len != sizeof(iio->ident.addr.ctype3_hdr) +
sizeof(struct in_addr))
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;
#if IS_ENABLED(CONFIG_IPV6)
case ICMP_AFI_IP6:
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] icmp: fix lib conflict with trinity
2021-06-03 21:22 [PATCH net-next] icmp: fix lib conflict with trinity Andreas Roeseler
@ 2021-06-03 22:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-03 22:40 UTC (permalink / raw)
To: Andreas Roeseler
Cc: netdev, davem, dsahern, kuba, willemdebrujin.kernel, fweimer
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 3 Jun 2021 16:22:11 -0500 you wrote:
> 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: Andreas Roeseler <andreas.a.roeseler@gmail.com>
>
> [...]
Here is the summary with links:
- [net-next] icmp: fix lib conflict with trinity
https://git.kernel.org/netdev/net-next/c/e32ea44c7ae4
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-03 22:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-03 21:22 [PATCH net-next] icmp: fix lib conflict with trinity Andreas Roeseler
2021-06-03 22:40 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.