From: Ben Pfaff Date: Thu, 19 Mar 2009 20:50:06 +0000 (-0700) Subject: secchan: Force revalidation in ofproto_add_flow(), ofproto_delete_flow(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=df9ad67d4ce30b400f5d64bcec653e708cd0690f;p=openvswitch 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(). --- 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); }