[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151008173914.16150fd0@griffin>
Date: Thu, 8 Oct 2015 17:39:14 +0200
From: Jiri Benc <jbenc@...hat.com>
To: Andreas Schultz <aschultz@...p.net>
Cc: netdev@...r.kernel.org, Pravin B Shelar <pshelar@...ira.com>,
"David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH net v2] fix return of iptunnel_xmit
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
--
Jiri Benc
--
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