mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
ofp-util: Properly handle "tun_id"s in tun_id_from_cookie flows.
Just setting the tun_id field isn't enough--it's also necessary to set
the tun_id_mask. Otherwise the call to cls_rule_zero_wildcarded_fields()
at the end of ofputil_cls_rule_from_match() will zero out the tun_id again.
This was broken by commit 8368c090ca
"Implement arbitrary bitwise masks
for tun_id field" back in January. (This makes me wonder whether we can
drop support for tun_id_from_cookie now.)
Reported-by: Dan Wendlandt <dan@nicira.com>
This commit is contained in:
@@ -137,7 +137,7 @@ ofputil_cls_rule_from_match(const struct ofp_match *match,
|
||||
wc->nw_dst_mask = ofputil_wcbits_to_netmask(ofpfw >> OFPFW_NW_DST_SHIFT);
|
||||
|
||||
if (flow_format == NXFF_TUN_ID_FROM_COOKIE && !(ofpfw & NXFW_TUN_ID)) {
|
||||
rule->flow.tun_id = htonll(ntohll(cookie) >> 32);
|
||||
cls_rule_set_tun_id(rule, htonll(ntohll(cookie) >> 32));
|
||||
}
|
||||
|
||||
if (ofpfw & OFPFW_DL_DST) {
|
||||
|
Reference in New Issue
Block a user