net: openvswitch: fix TTL decrement action netlink message format
authorEelco Chaudron <echaudro@redhat.com>
Tue, 24 Nov 2020 12:34:44 +0000 (07:34 -0500)
committerJakub Kicinski <kuba@kernel.org>
Fri, 27 Nov 2020 19:03:06 +0000 (11:03 -0800)
commit69929d4c49e182f8526d42c43b37b460d562d3a0
tree8ccdf7331d74889ac016c349a9dcfe292f04cbde
parentcbf3d60329c4e11edcecac0c8fc6767b0f05e3a7
net: openvswitch: fix TTL decrement action netlink message format

Currently, the openvswitch module is not accepting the correctly formated
netlink message for the TTL decrement action. For both setting and getting
the dec_ttl action, the actions should be nested in the
OVS_DEC_TTL_ATTR_ACTION attribute as mentioned in the openvswitch.h uapi.

When the original patch was sent, it was tested with a private OVS userspace
implementation. This implementation was unfortunately not upstreamed and
reviewed, hence an erroneous version of this patch was sent out.

Leaving the patch as-is would cause problems as the kernel module could
interpret additional attributes as actions and vice-versa, due to the
actions not being encapsulated/nested within the actual attribute, but
being concatinated after it.

Fixes: 744676e77720 ("openvswitch: add TTL decrement action")
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Link: https://lore.kernel.org/r/160622121495.27296.888010441924340582.stgit@wsfd-netdev64.ntdv.lab.eng.bos.redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/uapi/linux/openvswitch.h
net/openvswitch/actions.c
net/openvswitch/flow_netlink.c