From 1fa24dea754741732caa2ec2d04b365656d71962 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 20 Apr 2011 15:22:26 -0700 Subject: [PATCH] ofproto: Update ports immediately upon ofproto_port_add() too. I don't see a reason to defer this. --- ofproto/ofproto.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 1e4e9d9f..f8a67fcf 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); } -- 2.30.2