]> git.baikalelectronics.ru Git - 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)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Nov 2019 23:13:46 +0000 (15:13 -0800)
commit3801a84b155fa17e1efc43ad636cdf86a0a5ed7a
tree1ec4b3747d7bc94a73119ceb24b77d3698efe2c7
parentbee13aee1149296d039e97b43658c921ad126b77
openvswitch: fix flow command message size

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: 15345389e23c ("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>
net/openvswitch/datapath.c