aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/udp_tunnel/udp_tunnel.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-04-19 05:33:42 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-04-21 04:31:26 +0200
commit08c09a63fd766e3557c8e63acf3dc90c86549a1e (patch)
treea7de662761b6723e6d681160ca3aec78887a00c1 /src/compat/udp_tunnel/udp_tunnel.c
parentconfig: don't allow no-privatekey to mask preshared (diff)
downloadwireguard-linux-compat-08c09a63fd766e3557c8e63acf3dc90c86549a1e.tar.xz
wireguard-linux-compat-08c09a63fd766e3557c8e63acf3dc90c86549a1e.zip
compat: work on old 3.10
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/udp_tunnel/udp_tunnel.c')
-rw-r--r--src/compat/udp_tunnel/udp_tunnel.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compat/udp_tunnel/udp_tunnel.c b/src/compat/udp_tunnel/udp_tunnel.c
index d1286c0..88fb905 100644
--- a/src/compat/udp_tunnel/udp_tunnel.c
+++ b/src/compat/udp_tunnel/udp_tunnel.c
@@ -164,7 +164,11 @@ static int our_iptunnel_xmit(struct rtable *rt, struct sk_buff *skb,
iph->daddr = dst;
iph->saddr = src;
iph->ttl = ttl;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 53)
+ __ip_select_ident(iph, &rt->dst, (skb_shinfo(skb)->gso_segs ?: 1) - 1);
+#else
__ip_select_ident(iph, skb_shinfo(skb)->gso_segs ?: 1);
+#endif
err = ip_local_out(skb);
if (unlikely(net_xmit_eval(err)))