• N
    net/sched: fix ->get helper of the matchall cls · b301b887
    Nicolas Dichtel 提交于
    mainline inclusion
    from mainline-5.1
    commit 0db6f8befc32
    category: bugfix
    bugzilla: 13619
    CVE: NA
    
    -------------------------------------------------
    
    It returned always NULL, thus it was never possible to get the filter.
    
    Example:
    $ ip link add foo type dummy
    $ ip link add bar type dummy
    $ tc qdisc add dev foo clsact
    $ tc filter add dev foo protocol all pref 1 ingress handle 1234 \
    	matchall action mirred ingress mirror dev bar
    
    Before the patch:
    $ tc filter get dev foo protocol all pref 1 ingress handle 1234 matchall
    Error: Specified filter handle not found.
    We have an error talking to the kernel
    
    After:
    $ tc filter get dev foo protocol all pref 1 ingress handle 1234 matchall
    filter ingress protocol all pref 1 matchall chain 0 handle 0x4d2
      not_in_hw
            action order 1: mirred (Ingress Mirror to device bar) pipe
            index 1 ref 1 bind 1
    
    CC: Yotam Gigi <yotamg@mellanox.com>
    CC: Jiri Pirko <jiri@mellanox.com>
    Fixes: fd62d9f5 ("net/sched: matchall: Fix configuration race")
    Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    Signed-off-by: NZhiqiang Liu <liuzhiqiang26@huawei.com>
    Reviewed-by: NWenan Mao <maowenan@huawei.com>
    Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
    b301b887
cls_matchall.c 8.0 KB