diff options
author | Florin Coras <fcoras@cisco.com> | 2017-05-10 12:32:53 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2017-05-11 15:10:30 +0000 |
commit | b5c13fdf470da1f4b0cfde151ba106cd84414e6b (patch) | |
tree | 73aa796c51057b4bccaf5c1f3becb142274c6403 /src | |
parent | 6a5be214b95f3ec9f30eab46aa1a21a62a7bbc85 (diff) |
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 <fcoras@cisco.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/ip/ip6_forward.c | 5 |
1 files changed, 5 insertions, 0 deletions
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); |