summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_evpn_vty.c
diff options
context:
space:
mode:
authorDonald Sharp <donaldsharp72@gmail.com>2022-12-06 20:11:47 +0100
committerGitHub <noreply@github.com>2022-12-06 20:11:47 +0100
commit0fce20b8086bd06647b516af1ce614091a516086 (patch)
tree916d6d02e92f6e3a226d2355547bc72b21be653c /bgpd/bgp_evpn_vty.c
parentMerge pull request #12455 from mjstapp/revert_stop_zebra_last (diff)
parentbgpd: fix null pointer dereference (diff)
downloadfrr-0fce20b8086bd06647b516af1ce614091a516086.tar.xz
frr-0fce20b8086bd06647b516af1ce614091a516086.zip
Merge pull request #12339 from anlancs/fix/bgpd-null-show
bgpd: fix null pointer dereference
Diffstat (limited to 'bgpd/bgp_evpn_vty.c')
-rw-r--r--bgpd/bgp_evpn_vty.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bgpd/bgp_evpn_vty.c b/bgpd/bgp_evpn_vty.c
index 00545c96a..c3f648b72 100644
--- a/bgpd/bgp_evpn_vty.c
+++ b/bgpd/bgp_evpn_vty.c
@@ -2535,6 +2535,7 @@ static void evpn_show_route_vni_macip(struct vty *vty, struct bgp *bgp,
safi_t safi;
json_object *json_paths = NULL;
struct ethaddr empty_mac = {};
+ struct ipaddr empty_ip = {};
const struct prefix_evpn *evp;
afi = AFI_L2VPN;
@@ -2548,7 +2549,8 @@ static void evpn_show_route_vni_macip(struct vty *vty, struct bgp *bgp,
return;
}
- build_evpn_type2_prefix(&p, mac ? mac : &empty_mac, ip);
+ build_evpn_type2_prefix(&p, mac ? mac : &empty_mac,
+ ip ? ip : &empty_ip);
/* See if route exists. Look for both non-sticky and sticky. */
dest = bgp_evpn_vni_node_lookup(vpn, &p, NULL);