From: Justin Pettit Date: Fri, 28 Jun 2013 18:31:48 +0000 (-0700) Subject: flow: Don't assume non-IPv4 is IPv6 for un-wildcarding. X-Git-Tag: v1.11.0~49 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=0aa9aaee9fab1a3534a77c79736f9843edebe88a;hp=039ebcf1ec5ca2da59c5d22a1782dc04835c3dce;p=cascardo%2Fovs.git flow: Don't assume non-IPv4 is IPv6 for un-wildcarding. 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 Signed-off-by: Justin Pettit Acked-by: Ethan Jackson --- diff --git a/lib/flow.c b/lib/flow.c index d6b9f6943..689b120de 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -791,7 +791,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); }