From: Florin Coras Date: Wed, 10 May 2017 19:32:53 +0000 (-0700) Subject: Validate ip6 interface fib tables early on X-Git-Tag: v17.07-rc1~201 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=b5c13fdf470da1f4b0cfde151ba106cd84414e6b;p=vpp.git Validate ip6 interface fib tables early on This should avoid random crashes due to reception of packets (multicast in particular) before ip6 addresses are configured on the interfaces. Change-Id: Ibcf1a5a2ae2fa75f8b57da1b2f09f32c081210d7 Signed-off-by: Florin Coras --- diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c index 0ad96d0b9e0..25714e48d5a 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -688,6 +688,11 @@ VNET_FEATURE_INIT (ip6_interface_output, static) = { clib_error_t * ip6_sw_interface_add_del (vnet_main_t * vnm, u32 sw_if_index, u32 is_add) { + ip6_main_t *im = &ip6_main; + + vec_validate (im->fib_index_by_sw_if_index, sw_if_index); + vec_validate (im->mfib_index_by_sw_if_index, sw_if_index); + vnet_feature_enable_disable ("ip6-unicast", "ip6-drop", sw_if_index, is_add, 0, 0);