summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAndy Gospodarek2018-04-11 17:50:14 +0200
committerDavid S. Miller2018-04-11 20:41:59 +0200
commite85a9be93cf144623a823a0a60e4eda6ee337aef (patch)
tree150b1d3d1c814b3052ca5eba03646a83b838230b /kernel
parentbnxt_en: Fix ethtool -x crash when device is down. (diff)
downloadkernel-qcow2-linux-e85a9be93cf144623a823a0a60e4eda6ee337aef.tar.gz
kernel-qcow2-linux-e85a9be93cf144623a823a0a60e4eda6ee337aef.tar.xz
kernel-qcow2-linux-e85a9be93cf144623a823a0a60e4eda6ee337aef.zip
bnxt_en: do not allow wildcard matches for L2 flows
Before this patch the following commands would succeed as far as the user was concerned: $ tc qdisc add dev p1p1 ingress $ tc filter add dev p1p1 parent ffff: protocol all \ flower skip_sw action drop $ tc filter add dev p1p1 parent ffff: protocol ipv4 \ flower skip_sw src_mac 00:02:00:00:00:01/44 action drop The current flow offload infrastructure used does not support wildcard matching for ethernet headers, so do not allow the second or third commands to succeed. If a user wants to drop traffic on that interface the protocol and MAC addresses need to be specified explicitly: $ tc qdisc add dev p1p1 ingress $ tc filter add dev p1p1 parent ffff: protocol arp \ flower skip_sw action drop $ tc filter add dev p1p1 parent ffff: protocol ipv4 \ flower skip_sw action drop ... $ tc filter add dev p1p1 parent ffff: protocol ipv4 \ flower skip_sw src_mac 00:02:00:00:00:01 action drop $ tc filter add dev p1p1 parent ffff: protocol ipv4 \ flower skip_sw src_mac 00:02:00:00:00:02 action drop ... There are also checks for VLAN parameters in this patch as other callers may wildcard those parameters even if tc does not. Using different flow infrastructure could allow this to work in the future for L2 flows, but for now it does not. Fixes: 2ae7408fedfe ("bnxt_en: bnxt: add TC flower filter offload support") Signed-off-by: Andy Gospodarek <gospo@broadcom.com> Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions