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 ed331629de)
This commit is contained in:
Quentin Young 2019-10-28 15:41:38 +00:00 committed by Mergify
parent a5ee9bf40c
commit ae830bc355

View file

@ -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;