From: Haishuang Yan Date: Sun, 4 Sep 2016 10:52:51 +0000 (+0800) Subject: vxlan: Update tx_errors statistics if vxlan_build_skb return err. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5e1e61a33f987eb5d87c5acb199da99b6a9da93d;p=linux-beck.git vxlan: Update tx_errors statistics if vxlan_build_skb return err. If vxlan_build_skb return err < 0, tx_errors should be also increased. Signed-off-by: Haishuang Yan Acked-by: Jiri Benc Signed-off-by: David S. Miller --- diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 9735059dee99..199dec033cf8 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -2103,6 +2103,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, vni, md, flags, udp_sum); if (err < 0) { dst_release(ndst); + dev->stats.tx_errors++; return; } udp_tunnel6_xmit_skb(ndst, sk, skb, dev,