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:04:52 +0000 (11:04 -0700)
commit6f8dbd272a7d1b4a0f5d8cd58467c162ae65135e
tree2d02cdc925cecae606f10af185d0b896113b65e1
parent1805ee4b4d7c7a5be00bf57e97d885f8285ede59
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