mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
Fix issue with "strict" deletion of flows
OpenFlow provides the ability to delete flows that match a "strict" description. This means that wildcards are not active, and thus will only match a single flow that exactly matches the description. The code that checks for a match is pretty dumb and still compares the values of fields that are wildcarded. A recent change added a "tun_id" matching field, but did not zero out the field when it was supposed to be ignored, which broke the matching used by strict deletions. This sets the field regardless of whether the field is wildcarded or not. Reported-by: Natasha Gude <natasha@nicira.com> Bug #2775
This commit is contained in:
@@ -285,6 +285,8 @@ flow_from_match(const struct ofp_match *match, bool tun_id_from_cookie,
|
||||
flow->nw_dst = match->nw_dst;
|
||||
if (tun_id_from_cookie) {
|
||||
flow->tun_id = htonl(ntohll(cookie) >> 32);
|
||||
} else {
|
||||
flow->tun_id = 0;
|
||||
}
|
||||
flow->in_port = (match->in_port == htons(OFPP_LOCAL) ? ODPP_LOCAL
|
||||
: ntohs(match->in_port));
|
||||
|
Reference in New Issue
Block a user