Skip to content

Commit 486ffc3

Browse files
Asbjørn Sloth Tønnesenkuba-moo
authored andcommitted
net: qede: flower: validate control flags
This driver currently doesn't support any control flags. Use flow_rule_match_has_control_flags() to check for control flags, such as can be set through `tc flower ... ip_flags frag`. In case any control flags are masked, flow_rule_match_has_control_flags() sets a NL extended error message, and we return -EOPNOTSUPP. Only compile-tested. Signed-off-by: Asbjørn Sloth Tønnesen <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent f4edb4d commit 486ffc3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/qlogic/qede/qede_filter.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1848,6 +1848,9 @@ qede_parse_flow_attr(__be16 proto, struct flow_rule *rule,
18481848
return -EOPNOTSUPP;
18491849
}
18501850

1851+
if (flow_rule_match_has_control_flags(rule, extack))
1852+
return -EOPNOTSUPP;
1853+
18511854
if (proto != htons(ETH_P_IP) &&
18521855
proto != htons(ETH_P_IPV6)) {
18531856
NL_SET_ERR_MSG_FMT_MOD(extack, "Unsupported proto=0x%x",

0 commit comments

Comments
 (0)