bridge: Remove unwanted ports at time of ofproto creation.
authorBen Pfaff <blp@nicira.com>
Fri, 2 Mar 2012 21:26:35 +0000 (13:26 -0800)
committerBen Pfaff <blp@nicira.com>
Mon, 5 Mar 2012 21:12:44 +0000 (13:12 -0800)
commitfa5b5c17d058ad07f39c27447a82f21f559224b5
treeeda440714c263a61ed8bd75b0c5bdd6b980db151
parent9fafc529c74d427ca476cc9d4c7b1c54ae94e54a
bridge: Remove unwanted ports at time of ofproto creation.

The reconfiguration code only deleted unwanted ports for bridges that had
been created in previous (re)configurations.  In fact, we should run this
step even for bridges that are newly added, e.g. to delete ports that
were added by a previous run of ovs-vswitchd and deleted from the database
between runs.

Before this commit, the following left "int" in datapath br0.  After this
commit, "int" is properly deleted:

1. With ovs-vswitchd running:
      # ovs-vsctl add-br br0
      # ovs-vsctl add-port br0 int -- set interface int type=internal
2. Kill ovs-vswitchd, then:
      # ovs-vsctl --no-wait -- del-port br0 int
3. Restart ovs-vswitchd.

Bug #9957.
Reported-by: Hiroshi Tanaka <htanaka@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
AUTHORS
vswitchd/bridge.c