aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip
diff options
context:
space:
mode:
authorWojciech Dec <wdec@cisco.com>2017-02-14 16:24:28 +0100
committerJohn Lo <loj@cisco.com>2017-02-16 15:35:55 +0000
commit7bc731047d87bffa51581e3d08e21410858d2010 (patch)
tree2063e8230c6da7b73b01b8ece92f0b5e95f51cbb /src/vnet/ip
parenta4cb12b30d51be3463315688179297404783fe8d (diff)
Fix crash on deleting previously activated IPv6 interface - VPP-636
RADV Pool index was not getting updated Change-Id: I2d2f14c56f51034d39049d1c7e13c248180a865f Signed-off-by: Wojciech Dec <wdec@cisco.com>
Diffstat (limited to 'src/vnet/ip')
-rw-r--r--src/vnet/ip/ip6_neighbor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vnet/ip/ip6_neighbor.c b/src/vnet/ip/ip6_neighbor.c
index 46d04769a96..7229591e683 100644
--- a/src/vnet/ip/ip6_neighbor.c
+++ b/src/vnet/ip/ip6_neighbor.c
@@ -3257,6 +3257,7 @@ disable_ip6_interface (vlib_main_t * vm, u32 sw_if_index)
radv_info = pool_elt_at_index (nm->if_radv_pool, ri);
/* check radv_info ref count for other ip6 addresses on this interface */
+ /* This implicitly excludes the link local address */
if (radv_info->ref_count == 0)
{
/* essentially "disables" ipv6 on this interface */
@@ -3749,6 +3750,7 @@ ip6_neighbor_add_del_interface_address (ip6_main_t * im,
vec_validate_init_empty (nm->if_radv_pool_index_by_sw_if_index,
sw_if_index, ~0);
ri = nm->if_radv_pool_index_by_sw_if_index[sw_if_index];
+
if (ri != ~0)
{
/* get radv_info */
@@ -3773,6 +3775,8 @@ ip6_neighbor_add_del_interface_address (ip6_main_t * im,
if (!ip6_address_is_link_local_unicast (address))
radv_info->ref_count--;
}
+ /* Ensure that IPv6 is disabled, and LL removed after ref_count reaches 0 */
+ disable_ip6_interface (vm, sw_if_index);
}
}