From fc278f75f73da4f0f24653977d7e1470d7bed77e Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Wed, 13 Feb 2019 19:54:03 +0000 Subject: [PATCH] vrrpd: remove ifindex from hash key computation Ifindexes apparently change more often than one might expect and so are not suitable for use in hash keys. Signed-off-by: Quentin Young --- vrrpd/vrrp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c index b773bdf870..92caaeff3b 100644 --- a/vrrpd/vrrp.c +++ b/vrrpd/vrrp.c @@ -1614,8 +1614,7 @@ static unsigned int vrrp_hash_key(void *arg) struct vrrp_vrouter *vr = arg; char key[IFNAMSIZ + 64]; - snprintf(key, sizeof(key), "%d%s%u", vr->ifp->ifindex, vr->ifp->name, - vr->vrid); + snprintf(key, sizeof(key), "%s@%" PRIu8, vr->ifp->name, vr->vrid); return string_hash_make(key); } -- 2.39.5