Commit d9a1249e authored by Asbjørn Sloth Tønnesen's avatar Asbjørn Sloth Tønnesen Committed by David S. Miller
Browse files

net: dsa: microchip: ksz9477: flower: validate control flags



Add check for unsupported control flags.

Only compile-tested, no access to HW.

Signed-off-by: default avatarAsbjørn Sloth Tønnesen <ast@fiberby.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f8a5ea8c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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,