]> git.baikalelectronics.ru Git - kernel.git/commit
openvswitch: Serialize nested ct actions if provided
authorJoe Stringer <joestringer@nicira.com>
Tue, 20 Oct 2015 02:19:00 +0000 (19:19 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Oct 2015 02:33:43 +0000 (19:33 -0700)
commit796a3e44b37c63fa7a33bef7706b9335ad104d31
tree7ad9198789e194ebcdd7422ea664e26728cbb1a7
parentbbcef1b9faa9af0d5564f1d4d8908e736687277e
openvswitch: Serialize nested ct actions if provided

If userspace provides a ct action with no nested mark or label, then the
storage for these fields is zeroed. Later when actions are requested,
such zeroed fields are serialized even though userspace didn't
originally specify them. Fix the behaviour by ensuring that no action is
serialized in this case, and reject actions where userspace attempts to
set these fields with mask=0. This should make netlink marshalling
consistent across deserialization/reserialization.

Reported-by: Jarno Rajahalme <jrajahalme@nicira.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/openvswitch/conntrack.c