Fix a bug in conversion between flow/mask and flow key
authorGuolin Yang <gyang@nicira.com>
Fri, 30 Aug 2013 16:57:13 +0000 (09:57 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 30 Aug 2013 18:05:55 +0000 (11:05 -0700)
commitb175497e9b5ca4fa56d1aff3ab367baa5a221af6
tree5722081548c7bed52d6dfaaf175dc798111d579a
parent125dd65d1dd4031408d0d8d12948bee32478a49e
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.

Similarly in reverse conversion (parse_l2_5_onward()), we should
have same check.

Signed-off-by: Guolin Yang <gyang@nicira.com>
[blp@nicira.com changed && to || in parse_l2_5_onward()
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
lib/odp-util.c