From ae830bc35548a6ee5791c5087c790573f1a9bb66 Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Mon, 28 Oct 2019 15:41:38 +0000 Subject: [PATCH] vrrpd: give null when using null ifp to lookup vr This is still causing crashes somehow. Signed-off-by: Quentin Young (cherry picked from commit ed331629de425914568c1d5c114018878627cdaf) --- vrrpd/vrrp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c index e1bb40c28d..c3ab1abbd6 100644 --- a/vrrpd/vrrp.c +++ b/vrrpd/vrrp.c @@ -671,6 +671,9 @@ void vrrp_vrouter_destroy(struct vrrp_vrouter *vr) struct vrrp_vrouter *vrrp_lookup(const struct interface *ifp, uint8_t vrid) { + if (!ifp) + return NULL; + struct vrrp_vrouter vr; vr.vrid = vrid;