From eacf6385a92c86a81f4d47cd8d44e80d9805be72 Mon Sep 17 00:00:00 2001 From: Ben Pfaff 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 --- lib/classifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/classifier.c b/lib/classifier.c index 85c3c45a..38c4d25c 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 -- 2.30.2