diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-10-29 01:52:40 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-10-29 01:52:40 +0100 |
commit | d1accb2e1985f1125ce30d3d521a90c1cd0c28ef (patch) | |
tree | 0c8717c5bb88564fc569f88f9257e3fa631382a6 | |
parent | zebra: Fix some nhg SA issues found in latest Coverity (diff) | |
download | frr-d1accb2e1985f1125ce30d3d521a90c1cd0c28ef.tar.xz frr-d1accb2e1985f1125ce30d3d521a90c1cd0c28ef.zip |
zebra: zvni_map_to_svi may return NULL act accordingly
The zvni_map_to_svi function may return NULL as such prevent
a deref and crash. Found via coverity
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
-rw-r--r-- | zebra/zebra_vxlan.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c index 2417b505a..1d2748c8e 100644 --- a/zebra/zebra_vxlan.c +++ b/zebra/zebra_vxlan.c @@ -5775,12 +5775,14 @@ static void process_remote_macip_del(vni_t vni, vlan_if = zvni_map_to_svi(vxl->access_vlan, zif->brslave_info.br_if); if (IS_ZEBRA_DEBUG_VXLAN) - zlog_debug("%s: IP %s (flags 0x%x intf %s) is remote and duplicate, read kernel for local entry", - __PRETTY_FUNCTION__, - ipaddr2str(ipaddr, buf1, - sizeof(buf1)), n->flags, - vlan_if->name); - neigh_read_specific_ip(ipaddr, vlan_if); + zlog_debug( + "%s: IP %s (flags 0x%x intf %s) is remote and duplicate, read kernel for local entry", + __PRETTY_FUNCTION__, + ipaddr2str(ipaddr, buf1, sizeof(buf1)), + n->flags, + vlan_if ? vlan_if->name : "Unknown"); + if (vlan_if) + neigh_read_specific_ip(ipaddr, vlan_if); } /* When the MAC changes for an IP, it is possible the |