mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 14:25:26 +00:00
odp-util: Avoid revalidation error for masked NSH set action.
A masked NSH set action has mdtype 0 because the mdtype is not being changed, but odp_nsh_key_from_attr() rejects this because mdtype 0 does not match up with the OVS_NSH_KEY_ATTR_MD1 attribute being present. This fixes the problem. The kernel datapath in flow_netlink function nsh_key_put_from_nlattr() has a similar exception. Acked-by: Justin Pettit <jpettit@ovn.org> Signed-off-by: Ben Pfaff <blp@ovn.org>
This commit is contained in:
@@ -2712,7 +2712,7 @@ odp_nsh_key_from_attr(const struct nlattr *attr, struct ovs_key_nsh *nsh,
|
||||
return ODP_FIT_TOO_MUCH;
|
||||
}
|
||||
|
||||
if (has_md1 && nsh->mdtype != NSH_M_TYPE1) {
|
||||
if (has_md1 && nsh->mdtype != NSH_M_TYPE1 && !nsh_mask) {
|
||||
return ODP_FIT_ERROR;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user