flow_offload: fix allowed types check

Change the check to see if the passed allowed type bit is enabled.

Fixes: 319a1d1947 ("flow_offload: check for basic action hw stats type")
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko 2020-03-10 16:49:07 +01:00 committed by David S. Miller
parent 79c57bffeb
commit a393daa899
1 changed files with 1 additions and 1 deletions

View File

@ -306,7 +306,7 @@ flow_action_hw_stats_types_check(const struct flow_action *action,
NL_SET_ERR_MSG_MOD(extack, "Driver supports only default HW stats type \"any\"");
return false;
} else if (allowed_hw_stats_type != 0 &&
action_entry->hw_stats_type != allowed_hw_stats_type) {
!(action_entry->hw_stats_type & allowed_hw_stats_type)) {
NL_SET_ERR_MSG_MOD(extack, "Driver does not support selected HW stats type");
return false;
}