From 170851737d9833400ceaa3c60456b50654029006 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 4a0356411f..df749c6f21 100644 --- a/vrrpd/vrrp.c +++ b/vrrpd/vrrp.c @@ -669,6 +669,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; -- 2.39.5