ofproto-dpif: Revalidate on port additions and deletions.
authorEthan Jackson <ethan@nicira.com>
Mon, 3 Oct 2011 19:51:02 +0000 (12:51 -0700)
committerEthan Jackson <ethan@nicira.com>
Mon, 3 Oct 2011 20:12:52 +0000 (13:12 -0700)
The addition of a new port to an ofproto-dpif may require
revalidations in some cases.  Notably if this new port is
configured to participate in CFM, but a drop flow has already been
installed in the datapath for CFM messages with the same in_port.

Bug #7598.

ofproto/ofproto-dpif.c

index 761b59104daee855bea058cf4969e3acb97c7e66..44c7e56dc2b78324c516ef713bbf3334b73a958a 100644 (file)
@@ -758,6 +758,7 @@ port_construct(struct ofport *port_)
     struct ofport_dpif *port = ofport_dpif_cast(port_);
     struct ofproto_dpif *ofproto = ofproto_dpif_cast(port->up.ofproto);
 
+    ofproto->need_revalidate = true;
     port->odp_port = ofp_port_to_odp_port(port->up.ofp_port);
     port->bundle = NULL;
     port->cfm = NULL;
@@ -778,6 +779,7 @@ port_destruct(struct ofport *port_)
     struct ofport_dpif *port = ofport_dpif_cast(port_);
     struct ofproto_dpif *ofproto = ofproto_dpif_cast(port->up.ofproto);
 
+    ofproto->need_revalidate = true;
     bundle_remove(port_);
     set_cfm(port_, NULL);
     if (ofproto->sflow) {