From 09da9c7dadbfc6b3164eb5f85cbb3ca552399f4e Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Thu, 9 Dec 2010 17:52:39 -0800 Subject: [PATCH] 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 --- datapath/tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datapath/tunnel.c b/datapath/tunnel.c index aae3f3d9..c0e8b1e8 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; } -- 2.30.2