summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Di Proietto <ddiproietto@vmware.com>2014-07-10 12:39:39 -0700
committerPravin B Shelar <pshelar@nicira.com>2014-07-10 12:39:39 -0700
commitb3148d080b368eb2159a756fef702839b0ecddfe (patch)
tree088f50ee9f58b79beeae99a86751964d44adad66
parent8f037d1f76033d6398282b1fcb825b0d6c170402 (diff)
downloadopenvswitch-b3148d080b368eb2159a756fef702839b0ecddfe.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>
-rw-r--r--datapath/flow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/datapath/flow.c b/datapath/flow.c
index b3bc6838e..78924d605 100644
--- a/datapath/flow.c
+++ b/datapath/flow.c
@@ -221,7 +221,7 @@ static bool ovs_match_validate(const struct sw_flow_match *match,
htons(NDISC_NEIGHBOUR_SOLICITATION) ||
match->key->ipv6.tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) {
key_expected |= 1ULL << OVS_KEY_ATTR_ND;
- if (match->mask && (match->mask->key.ipv6.tp.src == htons(0xffff)))
+ if (match->mask && (match->mask->key.ipv6.tp.src == htons(0xff)))
mask_allowed |= 1ULL << OVS_KEY_ATTR_ND;
}
}