diff options
author | Asbjørn Sloth Tønnesen <ast@fiberby.net> | 2024-04-11 10:52:56 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2024-04-15 10:33:14 +0100 |
commit | f8a5ea8c2a7f2ad65e0b3f4e5054b9ebfc87c25e (patch) | |
tree | 9f904c554e877b4409e1f86139ab3174fa98c19b /drivers/net/ethernet/marvell | |
parent | e36245dacd2cca4be716e4096b7dc6df9c8a7a6b (diff) | |
download | linux-f8a5ea8c2a7f2ad65e0b3f4e5054b9ebfc87c25e.tar.gz linux-f8a5ea8c2a7f2ad65e0b3f4e5054b9ebfc87c25e.tar.bz2 linux-f8a5ea8c2a7f2ad65e0b3f4e5054b9ebfc87c25e.zip |
net: prestera: 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/ethernet/marvell')
-rw-r--r-- | drivers/net/ethernet/marvell/prestera/prestera_flower.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/marvell/prestera/prestera_flower.c b/drivers/net/ethernet/marvell/prestera/prestera_flower.c index 8b9455d8a4f7..418101a93149 100644 --- a/drivers/net/ethernet/marvell/prestera/prestera_flower.c +++ b/drivers/net/ethernet/marvell/prestera/prestera_flower.c @@ -229,6 +229,10 @@ static int prestera_flower_parse(struct prestera_flow_block *block, flow_rule_match_control(f_rule, &match); addr_type = match.key->addr_type; + + if (flow_rule_has_control_flags(match.mask->flags, + f->common.extack)) + return -EOPNOTSUPP; } if (flow_rule_match_key(f_rule, FLOW_DISSECTOR_KEY_BASIC)) { |