diff options
| author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2021-11-12 08:56:03 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-26 11:58:44 +0100 |
| commit | 8b7ebba9320f7e595d85ae792c75b5370aa62bb2 (patch) | |
| tree | 5736274ddc55fc73ff5c9f9e888e8fe91af10523 | |
| parent | 5ef16d2d172ee56714cff37cd005b98aba08ef5a (diff) | |
tun: fix bonding active backup with arp monitoring
commit a31d27fbed5d518734cb60956303eb15089a7634 upstream.
As stated in the bonding doc, trans_start must be set manually for drivers
using NETIF_F_LLTX:
Drivers that use NETIF_F_LLTX flag must also update
netdev_queue->trans_start. If they do not, then the ARP monitor will
immediately fail any slaves using that driver, and those slaves will stay
down.
Link: https://www.kernel.org/doc/html/v5.15/networking/bonding.html#arp-monitor-operation
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/net/tun.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7622f390ef1a..d4ce8b736065 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -821,6 +821,7 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev) { struct tun_struct *tun = netdev_priv(dev); int txq = skb->queue_mapping; + struct netdev_queue *queue; struct tun_file *tfile; u32 numqueues = 0; @@ -887,6 +888,10 @@ static netdev_tx_t tun_net_xmit(struct sk_buff *skb, struct net_device *dev) /* Enqueue packet */ skb_queue_tail(&tfile->socket.sk->sk_receive_queue, skb); + /* NETIF_F_LLTX requires to do our own update of trans_start */ + queue = netdev_get_tx_queue(dev, txq); + queue->trans_start = jiffies; + /* Notify and wake up reader process */ if (tfile->flags & TUN_FASYNC) kill_fasync(&tfile->fasync, SIGIO, POLL_IN); |
