[ovs-dev] [next 28/35] ofproto: Update ports immediately upon ofproto_port_add() too.

Ben Pfaff blp at nicira.com
Tue Apr 26 16:24:54 UTC 2011


I don't see a reason to defer this.
---
 ofproto/ofproto.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c
index b522d8b..071f608 100644
--- a/ofproto/ofproto.c
+++ b/ofproto/ofproto.c
@@ -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);
     }
-- 
1.7.4.4




More information about the dev mailing list