vxlan: Update tx_errors statistics if vxlan_build_skb return err.
authorHaishuang Yan <yanhaishuang@cmss.chinamobile.com>
Sun, 4 Sep 2016 10:52:51 +0000 (18:52 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Sep 2016 20:41:42 +0000 (13:41 -0700)
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>
drivers/net/vxlan.c

index 9735059dee9941526e7cb0b92986eee5db1af1b7..199dec033cf8c759a423ae16289659a46e59c808 100644 (file)
@@ -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,