Browse Source

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 <yanhaishuang@cmss.chinamobile.com>
Acked-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Haishuang Yan 9 years ago
parent
commit
5e1e61a33f
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/net/vxlan.c

+ 1 - 0
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,