datapath/flow_netlink: Fix NDP flow mask validation
authorDaniele Di Proietto <ddiproietto@vmware.com>
Wed, 9 Jul 2014 22:22:14 +0000 (15:22 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Thu, 10 Jul 2014 19:31:36 +0000 (12:31 -0700)
commit8e21fbb9d8dd495630350ef1831809d6249ee022
treea7002d2c11d1a20d348fbc702ee39267659fc185
parent49872bed7b294889ff430e82f4d8f57388ceee56
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_netlink.c