aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip6_link.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-10-12 11:46:53 +0000
committerMatthew Smith <mgsmith@netgate.com>2020-10-12 15:08:04 +0000
commitc96ac7648efcf3d6d62513de54d96d34378e20fa (patch)
tree99db6f225bbbb7f7b760b5bf12a974aaca96bbc8 /src/vnet/ip/ip6_link.c
parent70edc1c48724a0007f671a4ef53e982dbb5b87a9 (diff)
ip: IP6 incorrectly disabled on removing first ip6 prefix
Type: fix reference counting on the ip6 state was broken, meaning that disabling one of serveral ip6 configs on an interface, completely ip6 disabled the interface. Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: Ie3af51587310ffe871ad2a9cbd927e15a3ececa9
Diffstat (limited to 'src/vnet/ip/ip6_link.c')
-rw-r--r--src/vnet/ip/ip6_link.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/ip/ip6_link.c b/src/vnet/ip/ip6_link.c
index d2142f9aced..aabd1a54dc8 100644
--- a/src/vnet/ip/ip6_link.c
+++ b/src/vnet/ip/ip6_link.c
@@ -182,7 +182,7 @@ ip6_link_enable (u32 sw_if_index, const ip6_address_t * link_local_addr)
vec_validate (ip6_links, sw_if_index);
il = &ip6_links[sw_if_index];
- il->il_locks = 1;
+ il->il_locks = 0;
il->il_sw_if_index = sw_if_index;
sw = vnet_get_sup_sw_interface (vnm, sw_if_index);
@@ -238,6 +238,8 @@ ip6_link_enable (u32 sw_if_index, const ip6_address_t * link_local_addr)
rv = VNET_API_ERROR_VALUE_EXIST;
}
+ il->il_locks++;
+
out:
return (rv);
}