]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
openvswitch: fix flow command message size
authorPaolo Abeni <pabeni@redhat.com>
Tue, 26 Nov 2019 11:55:50 +0000 (12:55 +0100)
committerMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
Fri, 17 Jan 2020 17:21:45 +0000 (14:21 -0300)
commit021376d2e4f6f126ee1196a8acaf8b6c6f3a7a17
treed678569cdaf7a6a50217d726615982969a5c1e37
parent7441d7262678b1bd1fba2a1c9566b892c6b29b95
openvswitch: fix flow command message size

BugLink: https://bugs.launchpad.net/bugs/1855787
[ Upstream commit 4e81c0b3fa93d07653e2415fa71656b080a112fd ]

When user-space sets the OVS_UFID_F_OMIT_* flags, and the relevant
flow has no UFID, we can exceed the computed size, as
ovs_nla_put_identifier() will always dump an OVS_FLOW_ATTR_KEY
attribute.
Take the above in account when computing the flow command message
size.

Fixes: 74ed7ab9264c ("openvswitch: Add support for unique flow IDs.")
Reported-by: Qi Jun Ding <qding@redhat.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
net/openvswitch/datapath.c