From ede470b4fc50b4e53caf303536e7b7b0ba2b77d9 Mon Sep 17 00:00:00 2001 From: Gabriel Ganne Date: Mon, 6 Mar 2017 15:31:18 +0100 Subject: fix uninitialized ip6 keys within session.c fix for functions: - stream_session_lookup_listener6 - stream_session_lookup6 - stream_session_lookup_transport6 - stream_session_connect_notify eg. ~/vpp/build-data/../src/vnet/session/session.c: In function 'stream_session_lookup_listener6': ~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[3]' is used uninitialized in this function [-Werror=uninitialized] session_kv6_t kv6; ^ ~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[2]' is used uninitialized in this function [-Werror=uninitialized] ~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[5]' is used uninitialized in this function [-Werror=uninitialized] ~/vpp/build-data/../src/vnet/session/session.c:222:17: error: 'kv6.key[4]' is used uninitialized in this function [-Werror=uninitialized] Change-Id: I221cafbaf4effa43662ffcc7bf5f9581e28f9db9 Signed-off-by: Gabriel Ganne --- src/vnet/session/transport.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src') diff --git a/src/vnet/session/transport.h b/src/vnet/session/transport.h index 2d4415ba..f486dbb2 100644 --- a/src/vnet/session/transport.h +++ b/src/vnet/session/transport.h @@ -189,6 +189,10 @@ make_v6_ss_kv (session_kv6_t * kv, ip6_address_t * lcl, ip6_address_t * rmt, kv->key[0] = key.as_u64[0]; kv->key[1] = key.as_u64[1]; + kv->key[2] = 0; + kv->key[3] = 0; + kv->key[4] = 0; + kv->key[5] = 0; kv->value = ~0ULL; } @@ -209,6 +213,10 @@ make_v6_listener_kv (session_kv6_t * kv, ip6_address_t * lcl, u16 lcl_port, kv->key[0] = key.as_u64[0]; kv->key[1] = key.as_u64[1]; + kv->key[2] = 0; + kv->key[3] = 0; + kv->key[4] = 0; + kv->key[5] = 0; kv->value = ~0ULL; } -- cgit 1.2.3-korg