]> git.proxmox.com Git - mirror_ovs.git/commit
lib/odp: Fix handling of set masked action in parse_odp_action
authorPaul Blakey <paulb@mellanox.com>
Sun, 10 Sep 2017 05:00:06 +0000 (08:00 +0300)
committerSimon Horman <simon.horman@netronome.com>
Wed, 13 Sep 2017 09:42:32 +0000 (11:42 +0200)
commit34ed68a6617253d1c128b644cd84a430ff1fc291
tree6eeba57cd7b6faafdbfb017f643b2c137d06dc21
parent4257675e00478d691ced81840142c1083866ba2b
lib/odp: Fix handling of set masked action in parse_odp_action

If we find that we need to change from a SET to SET_MASKED action,
then we write the mask to the actions opfbuf. But if there was netlink
pad added to the buffer when writing the key, mask won't follow the
key data as per SET_MASKED spec.

Fix that by removing the padding before writing the mask, and
readding it if needed for alignment.

Fixes: 6d670e7f0d45 ("lib/odp: Masked set action execution and printing.")
Signed-off-by: Paul Blakey <paulb@mellanox.com>
Reviewed-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Simon Horman <simon.horman@netronome.com>
lib/odp-util.c