From df9ad67d4ce30b400f5d64bcec653e708cd0690f Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 19 Mar 2009 13:50:06 -0700 Subject: [PATCH] secchan: Force revalidation in ofproto_add_flow(), ofproto_delete_flow(). This code needs to have flows be revalidated if the rule includes wildcards, just like add_flow() and modify_flow(). --- secchan/ofproto.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/secchan/ofproto.c b/secchan/ofproto.c index 8a2b7741..3d69479b 100644 --- a/secchan/ofproto.c +++ b/secchan/ofproto.c @@ -971,7 +971,6 @@ ofproto_add_flow(struct ofproto *p, displaced_rule = rule_from_cls_rule(classifier_insert(&p->cls, &rule->cr)); if (displaced_rule) { - /* XXX */ rule_destroy(displaced_rule); } @@ -986,6 +985,9 @@ ofproto_add_flow(struct ofproto *p, rule_install(p, rule, NULL); } else { assert(!packet); + + /* We might need to change the rules for arbitrary subrules. */ + p->need_revalidate = true; } } @@ -999,6 +1001,9 @@ ofproto_delete_flow(struct ofproto *ofproto, const flow_t *flow, flow, wildcards, priority)); if (rule) { + if (rule->cr.wc.wildcards) { + ofproto->need_revalidate = true; + } classifier_remove(&ofproto->cls, &rule->cr); rule_destroy(rule); } -- 2.30.2