From: Quentin Young Date: Tue, 19 Feb 2019 22:36:34 +0000 (+0000) Subject: vrrpd: don't update interface addrs on ifup X-Git-Tag: base_7.2~330^2~69 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=8bceffc7c2da33a670723967cf525ab734b124f4;p=matthieu%2Ffrr.git vrrpd: don't update interface addrs on ifup Updating interface addresses on autoconfigured VRRP instances when we receive notification that an interface is up will cause us to delete that VRRP instance because Zebra deletes all interface addresses when an interfaces goes down so when it comes back up it has no addresses which causes us to delete the instance, then Zebra subsequently sends us the addresses which causes the instance to get recreated, however in a non-owner scenario this will merely cause us to start in Backup, wait a while, transition to Master, protodown off our interface, get an interface up notification, delete all our ip addresses, destroy ourselves, receive address notifications, recreate ourselves, reenter Backup and cycle through it all over again. So we just have to assume that no addresses went away since this interface was last up. Signed-off-by: Quentin Young --- diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c index 28ff2fa3c7..449b2aca7d 100644 --- a/vrrpd/vrrp.c +++ b/vrrpd/vrrp.c @@ -1680,8 +1680,8 @@ static int vrrp_autoconfig_if_del(struct interface *ifp) /* * Callback to notify autoconfig of interface up. * - * Roughly equivalent to vrrp_autoconfig_if_add, except that addresses are - * refreshed if an autoconfigured virtual router already exists. + * Creates VRRP instance on interface if it does not exist. Otherwise does + * nothing. * * ifp * Interface to operate on @@ -1705,8 +1705,6 @@ static int vrrp_autoconfig_if_up(struct interface *ifp) return 0; } - vrrp_autoconfig_autoaddrupdate(vr); - return 0; } diff --git a/vrrpd/vrrp_zebra.c b/vrrpd/vrrp_zebra.c index 7a68f1bbcd..223d61001e 100644 --- a/vrrpd/vrrp_zebra.c +++ b/vrrpd/vrrp_zebra.c @@ -54,9 +54,6 @@ static void vrrp_zebra_debug_if_dump_address(struct interface *ifp, for (ALL_LIST_ELEMENTS_RO(ifp->connected, node, ifc)) { struct prefix *p = ifc->address; - if (p->family != AF_INET) - continue; - DEBUGD(&vrrp_dbg_zebra, "%s: interface %s address %s %s", func, ifp->name, inet_ntoa(p->u.prefix4), CHECK_FLAG(ifc->flags, ZEBRA_IFA_SECONDARY) ? "secondary"