From 5e1e61a33f987eb5d87c5acb199da99b6a9da93d Mon Sep 17 00:00:00 2001 From: Haishuang Yan Date: Sun, 4 Sep 2016 18:52:51 +0800 Subject: [PATCH] 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 --- drivers/net/vxlan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 9735059..199dec0 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, -- 2.7.4