diff options
author | Florin Coras <fcoras@cisco.com> | 2017-05-10 12:32:53 -0700 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2017-05-15 20:16:20 +0000 |
commit | 99c0734e54f16456aed0c35b464d6d165e26d9b1 (patch) | |
tree | ad760bcd06ed440dd8aa60e777c0e83a14f0802d | |
parent | 307cfd8eb14ff7df04316ffa56f2c2481d650d7e (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>
-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 0b8691bf3dd..15970da5b36 100644 --- a/src/vnet/ip/ip6_forward.c +++ b/src/vnet/ip/ip6_forward.c @@ -659,6 +659,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); |