OSDN Git Service

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)
commite754ec69ab69601420eb2ed58ece803d77c93f61
tree7ad9198789e194ebcdd7422ea664e26728cbb1a7
parent4f0909ee3d8e3514a274121f3bf217a4920fa12d
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