diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-10-28 15:41:38 +0000 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2023-02-10 10:18:48 -0500 |
| commit | ed331629de425914568c1d5c114018878627cdaf (patch) | |
| tree | 89f507bd312728317a7c182f8eb8931cf537b677 /vrrpd/vrrp.c | |
| parent | 7809df20643ab9f731930dcef9661a70ef261e5b (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>
Diffstat (limited to 'vrrpd/vrrp.c')
| -rw-r--r-- | vrrpd/vrrp.c | 3 |
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; |
