]> 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)
commitce038dfc57c5766cf3094abb91dd884b936aafb1
tree7ad9198789e194ebcdd7422ea664e26728cbb1a7
parent41c2b12d8b5d4250afbe381a56b8e79cb1a0a919
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