summaryrefslogtreecommitdiffstats
path: root/vrrpd/vrrp.c
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-09-18 19:26:44 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2019-12-09 20:39:18 +0100
commit9323f278f3c6340bf3c2c162bbed92cd40f9b11a (patch)
tree34c1cb30bf251e8cd5977297f1afcfae9db48d64 /vrrpd/vrrp.c
parentvrrpd: const vrrp_lookup() (diff)
downloadfrr-9323f278f3c6340bf3c2c162bbed92cd40f9b11a.tar.xz
frr-9323f278f3c6340bf3c2c162bbed92cd40f9b11a.zip
vrrpd: allow vrrp_shutdown() on shutdown rtr
No need for a state check before the call, although still a good idea Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r--vrrpd/vrrp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c
index a0d5a4170..7a68b6b82 100644
--- a/vrrpd/vrrp.c
+++ b/vrrpd/vrrp.c
@@ -1415,7 +1415,7 @@ static void vrrp_change_state_initialize(struct vrrp_router *r)
r->ndisc_pending = false;
/* Disable ND Router Advertisements */
- if (r->family == AF_INET6)
+ if (r->family == AF_INET6 && r->mvl_ifp)
vrrp_zebra_radv_set(r, false);
}
@@ -1623,7 +1623,8 @@ static int vrrp_shutdown(struct vrrp_router *r)
THREAD_OFF(r->t_write);
/* Protodown macvlan */
- vrrp_zclient_send_interface_protodown(r->mvl_ifp, true);
+ if (r->mvl_ifp)
+ vrrp_zclient_send_interface_protodown(r->mvl_ifp, true);
/* Throw away our source address */
memset(&r->src, 0x00, sizeof(r->src));