]> git.proxmox.com Git - ovs.git/commit
datapath: flow_netlink: Fix a bug.
authorAlex Wang <alexw@nicira.com>
Wed, 23 Jul 2014 06:14:50 +0000 (23:14 -0700)
committerAlex Wang <alexw@nicira.com>
Wed, 23 Jul 2014 17:05:40 +0000 (10:05 -0700)
commit3854ab2153f943e2b2bb84520a0301424f01d4cb
tree587c2c03dc008df061a673d010b0f87f9bc84166
parentb6f4590fa036e213fcceafdcb5aa64bcf5c3e5c0
datapath: flow_netlink: Fix a bug.

Commit 62974663fe (datapath/flow_netlink: Create right mask with
disabled megaflows) introduced the bug which caused
ovs_nla_get_match() returns immediately after parsing the flow
mask for OVS_KEY_ATTR_ENCAP.  Consequently, when vlan encapsulated
packets are present, the corresponding datapath flows will have
incorrect mask like below.  And the incorrect flows could affect
other non-vlan packets.

~/ovs# ovs-dpctl dump-flows
in_port(3/0xffff0000),eth_type(0x8100),encap(), packets:0,
bytes:0, used:never, actions:2

This commit fixes the bug by checking and handling the return
value of the parsing function correctly.

Signed-off-by: Alex Wang <alexw@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/flow_netlink.c