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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to