From: Jesse Gross Date: Fri, 10 Dec 2010 01:52:39 +0000 (-0800) Subject: tunneling: Fix updated port pools commit. X-Git-Tag: v1.1.0~670 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=09da9c7dadbfc6b3164eb5f85cbb3ca552399f4e;p=sliver-openvswitch.git tunneling: Fix updated port pools commit. If readding a tunnel to the table fails during move_port(), we should decrement the port pool counter that it is in. However, when I attempted to do this, I accidentally put it in add_port(). Signed-off-by: Jesse Gross --- diff --git a/datapath/tunnel.c b/datapath/tunnel.c index aae3f3d91..c0e8b1e86 100644 --- a/datapath/tunnel.c +++ b/datapath/tunnel.c @@ -247,7 +247,6 @@ static int add_port(struct vport *vport) err = tbl_insert(port_table, &tnl_vport->tbl_node, mutable_hash(tnl_vport->mutable)); if (err) { - (*find_port_pool(tnl_vport->mutable))--; check_table_empty(); return err; } @@ -278,6 +277,7 @@ static int move_port(struct vport *vport, struct tnl_mutable_config *new_mutable err = tbl_insert(port_table, &tnl_vport->tbl_node, hash); if (err) { + (*find_port_pool(tnl_vport->mutable))--; check_table_empty(); return err; }