summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-04-24 02:58:07 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-04-24 02:58:07 +0200
commit1370d96432c2c7e86705ce99b1682a3b7c2ce1cd (patch)
tree0c7d337d936aa039d5a4346cd4bea5fb5edfc2f2
parentversion: bump snapshot (diff)
downloadwireguard-monolithic-historical-1370d96432c2c7e86705ce99b1682a3b7c2ce1cd.tar.xz
wireguard-monolithic-historical-1370d96432c2c7e86705ce99b1682a3b7c2ce1cd.zip
compat: use existing iptunnel_xmit function for stats
-rw-r--r--src/compat/udp_tunnel/udp_tunnel.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/compat/udp_tunnel/udp_tunnel.c b/src/compat/udp_tunnel/udp_tunnel.c
index 88fb905..94d7df8 100644
--- a/src/compat/udp_tunnel/udp_tunnel.c
+++ b/src/compat/udp_tunnel/udp_tunnel.c
@@ -136,13 +136,11 @@ static void fake_destructor(struct sk_buff *skb)
}
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
-static int our_iptunnel_xmit(struct rtable *rt, struct sk_buff *skb,
+static void our_iptunnel_xmit(struct rtable *rt, struct sk_buff *skb,
__be32 src, __be32 dst, __u8 proto,
__u8 tos, __u8 ttl, __be16 df, bool xnet)
{
- int pkt_len = skb->len;
struct iphdr *iph;
- int err;
skb_scrub_packet(skb, xnet);
@@ -170,10 +168,7 @@ static int our_iptunnel_xmit(struct rtable *rt, struct sk_buff *skb,
__ip_select_ident(iph, skb_shinfo(skb)->gso_segs ?: 1);
#endif
- err = ip_local_out(skb);
- if (unlikely(net_xmit_eval(err)))
- pkt_len = 0;
- return pkt_len;
+ iptunnel_xmit(skb, skb->dev);
}
#define iptunnel_xmit our_iptunnel_xmit
#endif