提交 a393daa8 编写于 作者: J Jiri Pirko 提交者: David S. Miller

flow_offload: fix allowed types check

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

Fixes: 319a1d19 ("flow_offload: check for basic action hw stats type")
Signed-off-by: NJiri Pirko <jiri@resnulli.us>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 79c57bff
...@@ -306,7 +306,7 @@ flow_action_hw_stats_types_check(const struct flow_action *action, ...@@ -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\""); NL_SET_ERR_MSG_MOD(extack, "Driver supports only default HW stats type \"any\"");
return false; return false;
} else if (allowed_hw_stats_type != 0 && } 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"); NL_SET_ERR_MSG_MOD(extack, "Driver does not support selected HW stats type");
return false; return false;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册