summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2019-10-28 15:41:38 +0000
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2023-02-14 14:30:22 +0000
commitae830bc35548a6ee5791c5087c790573f1a9bb66 (patch)
treea007336c71eb464087949671401fac1ce15e0b47
parenta5ee9bf40c9fa5cef4869e76631763655f863254 (diff)
vrrpd: give null when using null ifp to lookup vr
This is still causing crashes somehow. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> (cherry picked from commit ed331629de425914568c1d5c114018878627cdaf)
-rw-r--r--vrrpd/vrrp.c3
1 files changed, 3 insertions, 0 deletions
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;