diff options
author | Neale Ranns <nranns@cisco.com> | 2019-02-28 12:46:07 +0000 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2019-02-28 12:46:07 +0000 |
commit | 46ee286753d10e0afe06fee6121519d57bb50793 (patch) | |
tree | 367a18c33bfac249831ee9b75094de2aa12b7ed0 | |
parent | bad0bcd442417f943f2205112128dabeab36bf34 (diff) |
IPSEC: crash on SA dump when SA are bound to tunnels
Change-Id: I1c8256af838e6d4f371549ca91b8b0a4c0c44c65
Signed-off-by: Neale Ranns <nranns@cisco.com>
-rw-r--r-- | src/vnet/ipsec/ipsec_api.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/vnet/ipsec/ipsec_api.c b/src/vnet/ipsec/ipsec_api.c index fc09f77db6c..0a8f0a17ddf 100644 --- a/src/vnet/ipsec/ipsec_api.c +++ b/src/vnet/ipsec/ipsec_api.c @@ -557,8 +557,11 @@ send_ipsec_sa_details (ipsec_sa_t * sa, vl_api_registration_t * reg, mp->total_data_size = clib_host_to_net_u64 (sa->total_data_size); mp->udp_encap = sa->udp_encap; - mp->tx_table_id = - htonl (fib_table_get_table_id (sa->tx_fib_index, FIB_PROTOCOL_IP4)); + if (~0 != sa->tx_fib_index) + mp->tx_table_id = + htonl (fib_table_get_table_id (sa->tx_fib_index, FIB_PROTOCOL_IP4)); + else + mp->tx_table_id = ~0; vl_api_send_msg (reg, (u8 *) mp); } |