[ovs-dev] [PATCH] Fix issue with "strict" deletion of flows

Justin Pettit jpettit at nicira.com
Thu May 6 21:16:00 UTC 2010


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 at nicira.com>

Bug #2775
---
 lib/flow.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/flow.c b/lib/flow.c
index 700e7f8..fb7cf32 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));
-- 
1.7.0.3





More information about the dev mailing list