diff options
author | Neale Ranns <nranns@cisco.com> | 2018-12-04 09:39:40 +0000 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2018-12-05 06:28:31 +0000 |
commit | c90a2aa0f159401823107ca1715813ec108f793f (patch) | |
tree | 2778ba070ecaf03ce91ad2a382a8a0bdcfa0c5b0 | |
parent | ad5f2de9041070c007cedb87f94b72193125db17 (diff) |
MPLS: buffer over-run with incorrectly init'd vector. fix VAT dump
Change-Id: Ifdbb4c4cffd90c4ec8b39513d284ebf7be39eca5
Signed-off-by: Neale Ranns <nranns@cisco.com>
(cherry picked from commit 44cea225e2238a3c549f17f315cd1fbc6978c277)
-rw-r--r-- | src/vat/api_format.c | 4 | ||||
-rw-r--r-- | src/vnet/mpls/interface.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/vat/api_format.c b/src/vat/api_format.c index 96cf8026900..56ded020bca 100644 --- a/src/vat/api_format.c +++ b/src/vat/api_format.c @@ -20428,14 +20428,14 @@ vl_api_mpls_fib_path_print (vat_main_t * vam, vl_api_fib_path_t * fp) print (vam->ofp, " weight %d, sw_if_index %d, is_local %d, is_drop %d, " "is_unreach %d, is_prohitbit %d, afi %d, next_hop %U", - ntohl (fp->weight), ntohl (fp->sw_if_index), fp->is_local, + fp->weight, ntohl (fp->sw_if_index), fp->is_local, fp->is_drop, fp->is_unreach, fp->is_prohibit, fp->afi, format_ip6_address, fp->next_hop); else if (fp->afi == IP46_TYPE_IP4) print (vam->ofp, " weight %d, sw_if_index %d, is_local %d, is_drop %d, " "is_unreach %d, is_prohitbit %d, afi %d, next_hop %U", - ntohl (fp->weight), ntohl (fp->sw_if_index), fp->is_local, + fp->weight, ntohl (fp->sw_if_index), fp->is_local, fp->is_drop, fp->is_unreach, fp->is_prohibit, fp->afi, format_ip4_address, fp->next_hop); } diff --git a/src/vnet/mpls/interface.c b/src/vnet/mpls/interface.c index ec541f760de..46d80f07a38 100644 --- a/src/vnet/mpls/interface.c +++ b/src/vnet/mpls/interface.c @@ -62,7 +62,7 @@ mpls_sw_interface_enable_disable (mpls_main_t * mm, fib_table_lock(lfib_index, FIB_PROTOCOL_MPLS, (is_api? FIB_SOURCE_API: FIB_SOURCE_CLI)); - vec_validate(mm->fib_index_by_sw_if_index, 0); + vec_validate(mm->fib_index_by_sw_if_index, sw_if_index); mm->fib_index_by_sw_if_index[sw_if_index] = lfib_index; } else |