[ovs-dev] [PATCH 1/2] flow: Don't assume non-IPv4 is IPv6 for un-wildcarding.

Justin Pettit jpettit at nicira.com
Sat Jun 29 00:21:40 UTC 2013


When determinining what fields to un-wildcard for the symmetric L4 hash,
don't include the IPv6 address fields if the packet isn't IPv6.

Reported-by: Jarno Rajahalme <jarno.rajahalme at nsn.com>
Signed-off-by: Justin Pettit <jpettit at nicira.com>
---
 lib/flow.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/flow.c b/lib/flow.c
index 1a5084b..d899d26 100644
--- a/lib/flow.c
+++ b/lib/flow.c
@@ -795,7 +795,7 @@ flow_mask_hash_fields(const struct flow *flow, struct flow_wildcards *wc,
         if (flow->dl_type == htons(ETH_TYPE_IP)) {
             memset(&wc->masks.nw_src, 0xff, sizeof wc->masks.nw_src);
             memset(&wc->masks.nw_dst, 0xff, sizeof wc->masks.nw_dst);
-        } else {
+        } else if (flow->dl_type == htons(ETH_TYPE_IPV6)) {
             memset(&wc->masks.ipv6_src, 0xff, sizeof wc->masks.ipv6_src);
             memset(&wc->masks.ipv6_dst, 0xff, sizeof wc->masks.ipv6_dst);
         }
-- 
1.7.5.4




More information about the dev mailing list