summaryrefslogtreecommitdiff
path: root/datapath/flow_netlink.c
diff options
context:
space:
mode:
authorDaniele Di Proietto <ddiproietto@vmware.com>2014-07-09 15:22:14 -0700
committerPravin B Shelar <pshelar@nicira.com>2014-07-10 12:27:38 -0700
commit560f30990f6ac2c56eb061061b26b44ee2bd4dfd (patch)
treeaad84bcfb8224e6acdeb6ce139c3b0b823cceb14 /datapath/flow_netlink.c
parentb925336a36e6041b006d59ef78e91c5c13be62ba (diff)
downloadopenvswitch-560f30990f6ac2c56eb061061b26b44ee2bd4dfd.tar.gz
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>
Diffstat (limited to 'datapath/flow_netlink.c')
-rw-r--r--datapath/flow_netlink.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/datapath/flow_netlink.c b/datapath/flow_netlink.c
index 6ae69e9e6..f0cf2edfc 100644
--- a/datapath/flow_netlink.c
+++ b/datapath/flow_netlink.c
@@ -222,7 +222,7 @@ static bool match_validate(const struct sw_flow_match *match,
htons(NDISC_NEIGHBOUR_SOLICITATION) ||
match->key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) {
key_expected |= 1ULL << OVS_KEY_ATTR_ND;
- if (match->mask && (match->mask->key.tp.src == htons(0xffff)))
+ if (match->mask && (match->mask->key.tp.src == htons(0xff)))
mask_allowed |= 1ULL << OVS_KEY_ATTR_ND;
}
}