diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-04-09 13:44:27 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-04-09 14:24:12 +0200 |
commit | 486bd5a9e9b7b901b54bd309cf930ead8ea56ca7 (patch) | |
tree | 502b1fa53807b28eac2397e8df41c06e495d3c5c /src/compat/udp_tunnel/udp_tunnel.c | |
parent | f687fef304b12c2868e367372dbc9a6160a54a50 (diff) |
compat: careful with destructors
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.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compat/udp_tunnel/udp_tunnel.c b/src/compat/udp_tunnel/udp_tunnel.c index 2c60681..d1286c0 100644 --- a/src/compat/udp_tunnel/udp_tunnel.c +++ b/src/compat/udp_tunnel/udp_tunnel.c @@ -193,10 +193,10 @@ void udp_tunnel_xmit_skb(struct rtable *rt, struct sock *sk, struct sk_buff *skb udp_set_csum(nocheck, skb, src, dst, skb->len); - if (!skb->sk) { + if (!skb->sk) skb->sk = sk; + if (!skb->destructor) skb->destructor = fake_destructor; - } iptunnel_xmit( #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0) @@ -366,10 +366,10 @@ int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk, ip6h->daddr = *daddr; ip6h->saddr = *saddr; - if (!skb->sk) { + if (!skb->sk) skb->sk = sk; + if (!skb->destructor) skb->destructor = fake_destructor; - } ip6tunnel_xmit(skb, dev); return 0; |