ofproto: Update ports immediately upon ofproto_port_add() too.
authorBen Pfaff <blp@nicira.com>
Wed, 20 Apr 2011 22:22:26 +0000 (15:22 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 4 May 2011 17:40:14 +0000 (10:40 -0700)
I don't see a reason to defer this.

ofproto/ofproto.c

index 1e4e9d9..f8a67fc 100644 (file)
@@ -1018,6 +1018,9 @@ ofproto_port_add(struct ofproto *ofproto, struct netdev *netdev,
     int error;
 
     error = dpif_port_add(ofproto->dpif, netdev, &odp_port);
+    if (!error) {
+        update_port(ofproto, netdev_get_name(netdev));
+    }
     if (ofp_portp) {
         *ofp_portp = error ? OFPP_NONE : odp_port_to_ofp_port(odp_port);
     }