aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/vrrp/vrrp.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/vrrp/vrrp.h b/src/plugins/vrrp/vrrp.h
index 9c636c42802..0eda5d66164 100644
--- a/src/plugins/vrrp/vrrp.h
+++ b/src/plugins/vrrp/vrrp.h
@@ -230,13 +230,15 @@ always_inline vrrp_vr_t *
vrrp_vr_lookup (u32 sw_if_index, u8 vr_id, u8 is_ipv6)
{
vrrp_main_t *vmp = &vrrp_main;
- vrrp_vr_key_t key = {
- .sw_if_index = sw_if_index,
- .vr_id = vr_id,
- .is_ipv6 = (is_ipv6 != 0),
- };
+ vrrp_vr_key_t key;
uword *p;
+ clib_memset (&key, 0, sizeof (key));
+
+ key.sw_if_index = sw_if_index;
+ key.vr_id = vr_id;
+ key.is_ipv6 = (is_ipv6 != 0);
+
p = mhash_get (&vmp->vr_index_by_key, &key);
if (p)
return pool_elt_at_index (vmp->vrs, p[0]);