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 <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2019-02-13 19:54:03 +00:00
parent 6ad94d3abd
commit fc278f75f7

View File

@ -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);
}