diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-04-26 15:42:33 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-04-26 16:04:41 -0600 |
commit | bfc392e1d9a59c30fdcd9bb502ee8e7787911be0 (patch) | |
tree | 7c00e46ceb0bd09906025e48d380e5723e54e358 | |
parent | bfb7a96ba90363d9000a003acc36699aa5ad2e0d (diff) |
compat: prefix icmp[v6]_ndo_send with __compat
Some distros that backported icmp[v6]_ndo_send still try to build the
compat module in some corner case circumstances, resulting in errors.
Work around this with the usual __compat games.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/compat/compat.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index bb996b8..1473319 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -959,7 +959,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 -static inline void icmp_ndo_send(struct sk_buff *skb_in, int type, int code, __be32 info) +static inline void __compat_icmp_ndo_send(struct sk_buff *skb_in, int type, int code, __be32 info) { struct sk_buff *cloned_skb = NULL; enum ip_conntrack_info ctinfo; @@ -988,7 +988,7 @@ static inline void icmp_ndo_send(struct sk_buff *skb_in, int type, int code, __b out: consume_skb(cloned_skb); } -static inline void icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info) +static inline void __compat_icmpv6_ndo_send(struct sk_buff *skb_in, u8 type, u8 code, __u32 info) { struct sk_buff *cloned_skb = NULL; enum ip_conntrack_info ctinfo; @@ -1018,9 +1018,11 @@ out: consume_skb(cloned_skb); } #else -#define icmp_ndo_send icmp_send -#define icmpv6_ndo_send icmpv6_send +#define __compat_icmp_ndo_send icmp_send +#define __compat_icmpv6_ndo_send icmpv6_send #endif +#define icmp_ndo_send __compat_icmp_ndo_send +#define icmpv6_ndo_send __compat_icmpv6_ndo_send #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) |