Skip to content

Commit fb324f2

Browse files
Asbjørn Sloth Tønnesenanguy11
authored andcommitted
igb: 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]> Tested-by: Pucha Himasekhar Reddy <[email protected]> (A Contingent worker at Intel) Signed-off-by: Tony Nguyen <[email protected]>
1 parent 21e1fe9 commit fb324f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/intel/igb/igb_main.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2597,6 +2597,9 @@ static int igb_parse_cls_flower(struct igb_adapter *adapter,
25972597
return -EOPNOTSUPP;
25982598
}
25992599

2600+
if (flow_rule_match_has_control_flags(rule, extack))
2601+
return -EOPNOTSUPP;
2602+
26002603
if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_ETH_ADDRS)) {
26012604
struct flow_match_eth_addrs match;
26022605

0 commit comments

Comments
 (0)