From: Quentin Young Date: Wed, 13 Feb 2019 19:54:03 +0000 (+0000) Subject: vrrpd: remove ifindex from hash key computation X-Git-Tag: base_7.2~330^2~85 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=fc278f75f73da4f0f24653977d7e1470d7bed77e;p=mirror%2Ffrr.git 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 --- 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); }