diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-05-21 17:50:52 -0600 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-05-21 22:02:57 -0600 |
commit | 68d0cf10af1514fb92b2de7b59af8798c6fbca74 (patch) | |
tree | f1e13232882384d1b82e2bb19eae59752b6ca788 /src/compat | |
parent | 85140b431e1e6807cf6c243162a7328dedceeb9d (diff) |
compat: backport iptunnel_xmit to 3.11
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat')
-rw-r--r-- | src/compat/udp_tunnel/udp_tunnel.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/compat/udp_tunnel/udp_tunnel.c b/src/compat/udp_tunnel/udp_tunnel.c index da78069..9b8770a 100644 --- a/src/compat/udp_tunnel/udp_tunnel.c +++ b/src/compat/udp_tunnel/udp_tunnel.c @@ -183,7 +183,7 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb bool xnet, bool nocheck) { struct udphdr *uh; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) struct net_device *dev = skb->dev; int ret; #endif @@ -204,15 +204,22 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb skb->sk = sk; if (!skb->destructor) skb->destructor = __compat_fake_destructor; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) ret = #endif iptunnel_xmit( #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) sk, #endif - rt, skb, src, dst, IPPROTO_UDP, tos, ttl, df, xnet); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) + dev_net(dev), +#endif + rt, skb, src, dst, IPPROTO_UDP, tos, ttl, df +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 12, 0) || LINUX_VERSION_CODE < KERNEL_VERSION(3, 11, 0) + , xnet +#endif + ); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0) if (ret) iptunnel_xmit_stats(ret - 8, &dev->stats, dev->tstats); #endif |