diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-11-01 19:07:56 +0100 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-12-09 18:17:53 +0100 |
commit | 3cb543cf1e374197ff8d056cf8258be362fbdb5a (patch) | |
tree | 0ec66fe2e8da2a6104459731b2eafe5cfc926254 /vrrpd | |
parent | Merge pull request #5498 from mjstapp/sharp_with_labels (diff) | |
download | frr-3cb543cf1e374197ff8d056cf8258be362fbdb5a.tar.xz frr-3cb543cf1e374197ff8d056cf8258be362fbdb5a.zip |
vrrpd: handle failure to lookup parent iface
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'vrrpd')
-rw-r--r-- | vrrpd/vrrp.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vrrpd/vrrp.c b/vrrpd/vrrp.c index 42bb154f9..ab66e1a28 100644 --- a/vrrpd/vrrp.c +++ b/vrrpd/vrrp.c @@ -212,6 +212,15 @@ static struct vrrp_vrouter *vrrp_lookup_by_if_mvl(struct interface *mvl_ifp) } p = if_lookup_by_index(mvl_ifp->link_ifindex, VRF_DEFAULT); + + if (!p) { + DEBUGD(&vrrp_dbg_zebra, + VRRP_LOGPFX + "Tried to lookup interface %d, parent of %s, but it doesn't exist", + mvl_ifp->link_ifindex, mvl_ifp->name); + return NULL; + } + uint8_t vrid = mvl_ifp->hw_addr[5]; return vrrp_lookup(p, vrid); |