[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1444298104-4887-1-git-send-email-aschultz@tpip.net>
Date: Thu, 8 Oct 2015 11:55:04 +0200
From: Andreas Schultz <aschultz@...p.net>
To: netdev@...r.kernel.org
Cc: Pravin B Shelar <pshelar@...ira.com>,
"David S. Miller" <davem@...emloft.net>
Subject: [PATCH net] fix return of iptunnel_xmit
All users of iptunnel_xmit expect the return value to be the error
code from ip_output_local, but currently the return value is length
of the send data on success or zero on error.
Change iptunnel_xmit returns to match the callers expectation.
This bug was introduced when the ip_tunnel_core code was refactored.
Fixes: 0e6fbc5b6c6218987c93b8c7ca60cf786062899d
Signed-off-by: Andreas Schultz <aschultz@...p.net>
---
net/ipv4/ip_tunnel_core.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c
index 84dce6a..f25ccea 100644
--- a/net/ipv4/ip_tunnel_core.c
+++ b/net/ipv4/ip_tunnel_core.c
@@ -54,7 +54,6 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
{
int pkt_len = skb->len - skb_inner_network_offset(skb);
struct iphdr *iph;
- int err;
skb_scrub_packet(skb, xnet);
@@ -79,10 +78,7 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb,
__ip_select_ident(dev_net(rt->dst.dev), iph,
skb_shinfo(skb)->gso_segs ?: 1);
- err = ip_local_out_sk(sk, skb);
- if (unlikely(net_xmit_eval(err)))
- pkt_len = 0;
- return pkt_len;
+ return ip_local_out_sk(sk, skb);
}
EXPORT_SYMBOL_GPL(iptunnel_xmit);
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists