summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/microchip
diff options
context:
space:
mode:
authorAsbjørn Sloth Tønnesen <ast@fiberby.net>2024-04-11 10:52:57 +0000
committerDavid S. Miller <davem@davemloft.net>2024-04-15 10:33:14 +0100
commitd9a1249e715bb01160965c0b6e0ac03cafd554de (patch)
tree564031f088c2e70b571f7e1fe54830d13ee7db95 /drivers/net/dsa/microchip
parentf8a5ea8c2a7f2ad65e0b3f4e5054b9ebfc87c25e (diff)
downloadlwn-d9a1249e715bb01160965c0b6e0ac03cafd554de.tar.gz
lwn-d9a1249e715bb01160965c0b6e0ac03cafd554de.zip
net: dsa: microchip: ksz9477: flower: validate control flags
Add check for unsupported control flags. Only compile-tested, no access to HW. Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip')
-rw-r--r--drivers/net/dsa/microchip/ksz9477_tc_flower.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/dsa/microchip/ksz9477_tc_flower.c b/drivers/net/dsa/microchip/ksz9477_tc_flower.c
index 8b2f5be667e0..ca7830ab168a 100644
--- a/drivers/net/dsa/microchip/ksz9477_tc_flower.c
+++ b/drivers/net/dsa/microchip/ksz9477_tc_flower.c
@@ -124,6 +124,9 @@ static int ksz9477_flower_parse_key(struct ksz_device *dev, int port,
return -EOPNOTSUPP;
}
+ if (flow_rule_match_has_control_flags(rule, extack))
+ return -EOPNOTSUPP;
+
if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_BASIC) ||
flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS)) {
ret = ksz9477_flower_parse_key_l2(dev, port, extack, rule,