diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2017-03-07 10:23:01 +0100 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2017-03-08 15:50:57 +0000 |
commit | 6786f1b5f8401d1ebc843b77e7d7315d34f3895d (patch) | |
tree | 483b4f0f7c2077d3a58e2bb8fa2d1ac64e77721f | |
parent | 141ecc5495985612a23465f0772711bf77f7ce60 (diff) |
LISP: fix gpe sub-interface lookup
Change-Id: I080b90a4bc53c2595ade696c592e86790c7ca939
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
-rw-r--r-- | src/vnet/lisp-gpe/lisp_gpe_sub_interface.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/vnet/lisp-gpe/lisp_gpe_sub_interface.c b/src/vnet/lisp-gpe/lisp_gpe_sub_interface.c index 56f5263650d..0dfbc40d8e7 100644 --- a/src/vnet/lisp-gpe/lisp_gpe_sub_interface.c +++ b/src/vnet/lisp-gpe/lisp_gpe_sub_interface.c @@ -49,11 +49,11 @@ lisp_gpe_sub_interface_db_find (const ip_address_t * lrloc, u32 vni) { uword *p; - lisp_gpe_sub_interface_key_t key = { - .local_rloc = *lrloc, - .vni = clib_host_to_net_u32 (vni), - }; + lisp_gpe_sub_interface_key_t key; + memset (&key, 0, sizeof (key)); + ip_address_copy (&key.local_rloc, lrloc); + key.vni = clib_host_to_net_u32 (vni); p = hash_get_mem (lisp_gpe_sub_interfaces, &key); if (NULL == p) @@ -66,16 +66,16 @@ static void lisp_gpe_sub_interface_db_insert (const lisp_gpe_sub_interface_t * l3s) { hash_set_mem (lisp_gpe_sub_interfaces, - &l3s->key, l3s - lisp_gpe_sub_interface_pool); + l3s->key, l3s - lisp_gpe_sub_interface_pool); hash_set_mem (lisp_gpe_sub_interfaces_sw_if_index, - &l3s->key, l3s->sw_if_index); + l3s->key, l3s->sw_if_index); } static void lisp_gpe_sub_interface_db_remove (const lisp_gpe_sub_interface_t * l3s) { - hash_unset_mem (lisp_gpe_sub_interfaces, &l3s->key); - hash_unset_mem (lisp_gpe_sub_interfaces_sw_if_index, &l3s->key); + hash_unset_mem (lisp_gpe_sub_interfaces, l3s->key); + hash_unset_mem (lisp_gpe_sub_interfaces_sw_if_index, l3s->key); } lisp_gpe_sub_interface_t * |