All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: wireguard: fix error with icmp{,v6}_ndo_send in 5.4
@ 2021-03-15 13:21 Frank Wunderlich
  2021-03-16 16:17 ` Aw: " Frank Wunderlich
  0 siblings, 1 reply; 2+ messages in thread
From: Frank Wunderlich @ 2021-03-15 13:21 UTC (permalink / raw)
  To: David S. Miller, netdev, linux-kernel; +Cc: Frank Wunderlich

From: Frank Wunderlich <frank-w@public-files.de>

commit 2019554f9656 introduces implementation of icmp{,v6}_ndo_send in
include/linux/icmp{,v6}.h in case of NF_NAT is enabled. Now these
functions are defined twice in wireguard. Fix this by hiding code if
NF_NAT is set (reverse condition as in icmp*.h)

././net/wireguard/compat/compat.h:959:20: error: static declaration of 'icmp_ndo_send' follows non-static declaration
  959 | static inline void icmp_ndo_send(struct sk_buff *skb_in, int type, int code, __be32 info)
./include/net/icmp.h:47:6: note: previous declaration of 'icmp_ndo_send' was here
   47 | void icmp_ndo_send(struct sk_buff *skb_in, int type, int code, __be32 info);
././net/wireguard/compat/compat.h:988:20: error: static declaration of 'icmpv6_ndo_send' follows non-static declaration
  988 | static inline void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info)
./include/linux/icmpv6.h:56:6: note: previous declaration of 'icmpv6_ndo_send' was here
   56 | void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info);

Fixes: 2019554f9656 ("icmp: introduce helper for nat'd source address in network device context")
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 net/wireguard/compat/compat.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/wireguard/compat/compat.h b/net/wireguard/compat/compat.h
index 42f7beecaa5c..7cdb0b253c60 100644
--- a/net/wireguard/compat/compat.h
+++ b/net/wireguard/compat/compat.h
@@ -956,6 +956,7 @@ static inline int skb_ensure_writable(struct sk_buff *skb, int write_len)
 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
 #include <net/netfilter/nf_nat_core.h>
 #endif
+#if !IS_ENABLED(CONFIG_NF_NAT)
 static inline void icmp_ndo_send(struct sk_buff *skb_in, int type, int code, __be32 info)
 {
 	struct sk_buff *cloned_skb = NULL;
@@ -1014,6 +1015,7 @@ static inline void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u
 out:
 	consume_skb(cloned_skb);
 }
+#endif
 #else
 #define icmp_ndo_send icmp_send
 #define icmpv6_ndo_send icmpv6_send
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Aw: [PATCH] net: wireguard: fix error with icmp{,v6}_ndo_send in 5.4
  2021-03-15 13:21 [PATCH] net: wireguard: fix error with icmp{,v6}_ndo_send in 5.4 Frank Wunderlich
@ 2021-03-16 16:17 ` Frank Wunderlich
  0 siblings, 0 replies; 2+ messages in thread
From: Frank Wunderlich @ 2021-03-16 16:17 UTC (permalink / raw)
  To: Frank Wunderlich; +Cc: David S. Miller, netdev, linux-kernel

Hi,

sorry, please ignore this
wireguard was included with 5.6, my 5.4 uses external wireguard

regards Frank


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-16 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-15 13:21 [PATCH] net: wireguard: fix error with icmp{,v6}_ndo_send in 5.4 Frank Wunderlich
2021-03-16 16:17 ` Aw: " Frank Wunderlich

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.