ip-neighbor: fix MLD hash key using stack pointer 74/27574/2
authorBenoît Ganne <bganne@cisco.com>
Tue, 16 Jun 2020 10:07:09 +0000 (12:07 +0200)
committerMatthew Smith <mgsmith@netgate.com>
Wed, 17 Jun 2020 00:44:54 +0000 (00:44 +0000)
Use pointed value (ipv6 address) as hash key instead of pointer value
(pointer to ipv6 address on the stack).

Type: fix

Change-Id: I74a8b6d4bb552b5b344bcb50c8e830700c4ce739
Signed-off-by: Benoît Ganne <bganne@cisco.com>
src/vnet/ip6-nd/ip6_mld.c

index f1f5a68..6e6a5ca 100644 (file)
@@ -135,12 +135,12 @@ ip6_neighbor_del_mld_prefix (ip6_mld_t * imd, ip6_address_t * addr)
   ip6_mldp_group_t *mcast_group_info;
   uword *p;
 
-  p = mhash_get (&imd->address_to_mldp_index, &addr);
+  p = mhash_get (&imd->address_to_mldp_index, addr);
   mcast_group_info = p ? pool_elt_at_index (imd->mldp_group_pool, p[0]) : 0;
 
   if (mcast_group_info)
     {
-      mhash_unset (&imd->address_to_mldp_index, &addr,
+      mhash_unset (&imd->address_to_mldp_index, addr,
                   /* old_value */ 0);
       pool_put (imd->mldp_group_pool, mcast_group_info);
     }