From 7dab724e7d49b3fbaeed67b9d3d22378996a604e Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Thu, 6 May 2010 14:05:25 -0700 Subject: [PATCH] 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 Bug #2775 --- lib/flow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/flow.c b/lib/flow.c index 700e7f81..fb7cf32a 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -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)); -- 2.30.2