openvswitch: Fix flow mask validation.
Following patch fixes typo in the flow validation. This prevented
installation of ARP and IPv6 flows.
Fixes: 19e7a3df72
("openvswitch: Fix NDP flow mask validation")
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Reviewed-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4fc11e61f4
commit
f2a01517f2
|
@ -145,7 +145,7 @@ static bool match_validate(const struct sw_flow_match *match,
|
||||||
if (match->key->eth.type == htons(ETH_P_ARP)
|
if (match->key->eth.type == htons(ETH_P_ARP)
|
||||||
|| match->key->eth.type == htons(ETH_P_RARP)) {
|
|| match->key->eth.type == htons(ETH_P_RARP)) {
|
||||||
key_expected |= 1 << OVS_KEY_ATTR_ARP;
|
key_expected |= 1 << OVS_KEY_ATTR_ARP;
|
||||||
if (match->mask && (match->mask->key.tp.src == htons(0xff)))
|
if (match->mask && (match->mask->key.eth.type == htons(0xffff)))
|
||||||
mask_allowed |= 1 << OVS_KEY_ATTR_ARP;
|
mask_allowed |= 1 << OVS_KEY_ATTR_ARP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@ static bool match_validate(const struct sw_flow_match *match,
|
||||||
htons(NDISC_NEIGHBOUR_SOLICITATION) ||
|
htons(NDISC_NEIGHBOUR_SOLICITATION) ||
|
||||||
match->key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) {
|
match->key->tp.src == htons(NDISC_NEIGHBOUR_ADVERTISEMENT)) {
|
||||||
key_expected |= 1 << OVS_KEY_ATTR_ND;
|
key_expected |= 1 << 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 |= 1 << OVS_KEY_ATTR_ND;
|
mask_allowed |= 1 << OVS_KEY_ATTR_ND;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue