Message ID | 56168CE2.6060208@tpip.net |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
On Thu, 8 Oct 2015 17:33:54 +0200, Andreas Schultz wrote: > --- a/net/ipv4/ip_tunnel_core.c > +++ b/net/ipv4/ip_tunnel_core.c > @@ -80,9 +80,12 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, > 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; > + if (likely(net_xmit_eval(err) == 0)) > + return pkt_len; > + if (err < 0) > + return err; > + > + return 0; > } That looks better :-) Thanks, Jiri
diff --git a/net/ipv4/ip_tunnel_core.c b/net/ipv4/ip_tunnel_core.c index 84dce6a..5cced3b 100644 --- a/net/ipv4/ip_tunnel_core.c +++ b/net/ipv4/ip_tunnel_core.c @@ -80,9 +80,12 @@ int iptunnel_xmit(struct sock *sk, struct rtable *rt, struct sk_buff *skb, 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; + if (likely(net_xmit_eval(err) == 0)) + return pkt_len; + if (err < 0) + return err; + + return 0; } EXPORT_SYMBOL_GPL(iptunnel_xmit);