datapath/flow_netlink: Fix NDP flow mask validation
authorDaniele Di Proietto <ddiproietto@vmware.com>
Thu, 10 Jul 2014 19:39:39 +0000 (12:39 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Thu, 10 Jul 2014 19:39:39 +0000 (12:39 -0700)
commitb3148d080b368eb2159a756fef702839b0ecddfe
tree088f50ee9f58b79beeae99a86751964d44adad66
parent8f037d1f76033d6398282b1fcb825b0d6c170402
datapath/flow_netlink: Fix NDP flow mask validation

match_validate() enforce that a mask matching on NDP attributes has also an
exact match on ICMPv6 type.
The ICMPv6 type, which is 8-bit wide, is stored in the 'tp.src' field of
'struct sw_flow_key', which is 16-bit wide.
Therefore, an exact match on ICMPv6 type should only check the first 8 bits.

This commit fixes a bug that prevented flows with an exact match on NDP field
from being installed

Signed-off-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/flow.c