From 770d95812027f53053aff9e4f151d8765e79b9e9 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Mon, 24 Apr 2017 02:58:07 +0200 Subject: compat: use existing iptunnel_xmit function for stats Signed-off-by: Jason A. Donenfeld --- src/compat/udp_tunnel/udp_tunnel.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/compat/udp_tunnel') 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 -- cgit v1.2.3