]> git.proxmox.com Git - mirror_ovs.git/commit
meta-flow: Remove metadata prerequisite on ether type.
authorJarno Rajahalme <jarno@ovn.org>
Fri, 24 Mar 2017 18:47:15 +0000 (11:47 -0700)
committerJarno Rajahalme <jarno@ovn.org>
Fri, 24 Mar 2017 18:47:15 +0000 (11:47 -0700)
commite75aad80e30119d5c981559e920b5428a54f4766
tree8ad40905a58fa30b58f126e6dd4e14d5b55311a8
parent64fb5f82d94b7286888052609f7e3b247f2a58b8
meta-flow: Remove metadata prerequisite on ether type.

Conntrack original direction tuple fields depend on the conntrack
state and the type of the packet that was tracked.  These dependencies
were encoded as OpenFlow prerequisites in commit daf4d3c18da4 ("odp:
Support conntrack orig tuple key.").  However, having a prerequisite
from a metadata field to a packet header turned out to be problematic,
since sometimes we are decoding metadata fields alone, so that the
packet type field is not available.

The reason for the packet type dependency is that the IP addresses in
the original direction tuple can be either IPv4 or IPv6 addresses, and
it would be invalid to match on IPv4 original direction tuple
addresses for an IPv6 packet and vica verca.  Upon closer look,
however, allowing this kind of mismatched match only causes the flow
to never match anything, rather than causing more severe problems.

This patch removes the formal prerequisite on the packet type, but
replaces that with an explicit check for the mismatch on flow install.
This way we can still return an error to the controller if it tries to
install a mismatched flow.

Reported-by: Dong Jun <dongj@dtdream.com>
Reported-at: https://mail.openvswitch.org/pipermail/ovs-dev/2017-March/330052.html
Fixes: 7befb20d0f70 ("nx-match: Fix oxm decode.")
Fixes: daf4d3c18da4 ("odp: Support conntrack orig tuple key.")
Suggested-by: Numan Siddique <nusiddiq@redhat.com>
Suggested-by: Ben Pfaff <blp@ovn.org>
Signed-off-by: Jarno Rajahalme <jarno@ovn.org>
Tested-by: Numan Siddique <nusiddiq@redhat.com>
Acked-by: Numan Siddique <nusiddiq@redhat.com>
Acked-by: Ben Pfaff <blp@ovn.org>
build-aux/extract-ofp-fields
include/openvswitch/meta-flow.h
lib/meta-flow.c
lib/ofp-util.c