[ovs-dev] fixed (was: Re: Open vSwitch crashes when running NOX with some components)

Ben Pfaff blp at nicira.com
Thu Nov 11 18:29:36 UTC 2010


I fixed the bug with the following commit, for which I took the liberty
of pushing directly to master unreviewed.

Thank you very much for the report.

--8<--------------------------cut here-------------------------->8--

>From eacf6385a92c86a81f4d47cd8d44e80d9805be72 Mon Sep 17 00:00:00 2001
From: Ben Pfaff <blp at nicira.com>
Date: Thu, 11 Nov 2010 10:25:34 -0800
Subject: [PATCH] classifier: Pass correct member to CONTAINER_OF in cls_table_next_rule().

Fixes a segmentation fault in uses of CLASSIFIER_FOR_EACH_EXACT_RULE.

Reported-by: Derek Cormier <derek.cormier at lab.ntt.co.jp>
---
 lib/classifier.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/classifier.c b/lib/classifier.c
index 85c3c45..38c4d25 100644
--- a/lib/classifier.c
+++ b/lib/classifier.c
@@ -91,7 +91,7 @@ struct cls_rule *
 cls_table_next_rule(const struct cls_table *table, const struct cls_rule *rule)
 {
     struct cls_rule *next
-        = CONTAINER_OF(rule->list.next, struct cls_rule, hmap_node);
+        = CONTAINER_OF(rule->list.next, struct cls_rule, list);
 
     return (next->priority < rule->priority
             ? next
-- 
1.7.1





More information about the dev mailing list