odp-util: Fix a bug in conversion between flow/mask and flow key
authorGuolin Yang <gyang@nicira.com>
Fri, 30 Aug 2013 20:45:56 +0000 (13:45 -0700)
committerBen Pfaff <blp@nicira.com>
Tue, 10 Sep 2013 20:57:17 +0000 (13:57 -0700)
commite74f6cea952ecdb2b2f73c07a3ef3fa844fb31a5
treee145f3b2cb973bfbae73814ea5566fcdb37662bd
parentd7bfc5ce313a4a2d76ea78e91b215d4bd8c331f0
odp-util: Fix a bug in conversion between flow/mask and flow key

In odp_flow_key_from_flow__(), when converting ICMPv6 flow/mask
to flow/mask key, we should always use flow to check for whether
ND informaition is present or not. In mask case, both type and code
field should be masked, otherwise ND fields can be masked.

This patch is an abridged version of the same patch committed on master.
This patch only contains necessary bug fix, but dropped extra protocol
sanity checks.

Signed-off-by: Guolin Yang <gyang@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
lib/odp-util.c