diff options
author | Jason Wang <jasowang@redhat.com> | 2014-11-18 08:20:41 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-11-19 22:43:47 +0300 |
commit | baeababb5b85d5c4e6c917efe2a1504179438d3b (patch) | |
tree | d6d49a06b241812b5f1955bc4ef417d6aba3bb8a /drivers/net/tun.c | |
parent | e3e3217029a35c579bf100998b43976d0b1cb8d7 (diff) | |
download | linux-baeababb5b85d5c4e6c917efe2a1504179438d3b.tar.xz |
tun: return NET_XMIT_DROP for dropped packets
After commit 5d097109257c03a71845729f8db6b5770c4bbedc
("tun: only queue packets on device"), NETDEV_TX_OK was returned for
dropped packets. This will confuse pktgen since dropped packets were
counted as sent ones.
Fixing this by returning NET_XMIT_DROP to let pktgen count it as error
packet.
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r-- | drivers/net/tun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e3fa65a4d96c..ac53a7316ecd 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -819,7 +819,7 @@ drop: skb_tx_error(skb); kfree_skb(skb); rcu_read_unlock(); - return NETDEV_TX_OK; + return NET_XMIT_DROP; } static void tun_net_mclist(struct net_device *dev) |