• Victor Nogueira's avatar
    net/sched: act_mirred: Add carrier check · 526f28bd
    Victor Nogueira authored
    There are cases where the device is adminstratively UP, but operationally
    down. For example, we have a physical device (Nvidia ConnectX-6 Dx, 25Gbps)
    who's cable was pulled out, here is its ip link output:
    
    5: ens2f1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
        link/ether b8:ce:f6:4b:68:35 brd ff:ff:ff:ff:ff:ff
        altname enp179s0f1np1
    
    As you can see, it's administratively UP but operationally down.
    In this case, sending a packet to this port caused a nasty kernel hang (so
    nasty that we were unable to capture it). Aborting a transmit based on
    operational status (in addition to administrative status) fixes the issue.
    
    Fixes: 1da177e4 ("Linux-2.6.12-rc2")
    Acked-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
    Signed-off-by: default avatarVictor Nogueira <victor@mojatatu.com>
    v1->v2: Add fixes tag
    v2->v3: Remove blank line between tags + add change log, suggested by Leon
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    526f28bd
act_mirred.c 13.8 KB