summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_mplsvpn.c
diff options
context:
space:
mode:
authorPhilippe Guibert <philippe.guibert@6wind.com>2023-02-10 18:12:48 +0100
committerPhilippe Guibert <philippe.guibert@6wind.com>2023-02-10 18:17:32 +0100
commit616e9f0d9f0458788adf4b30707016c8db383b02 (patch)
treef3e5fffd735cb063d1764bc41a82e9724be4f645 /bgpd/bgp_mplsvpn.c
parentbgpd: fix dereference of null pointer in bgp_attr_aspath (diff)
downloadfrr-616e9f0d9f0458788adf4b30707016c8db383b02.tar.xz
frr-616e9f0d9f0458788adf4b30707016c8db383b02.zip
bgpd: handle case where passed RD is null
The function vpn_leak_to_vrf_update_onevrf() has the RD parameter set to NULL. Test the RD value before displaying it in the called function. Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Diffstat (limited to 'bgpd/bgp_mplsvpn.c')
-rw-r--r--bgpd/bgp_mplsvpn.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_mplsvpn.c b/bgpd/bgp_mplsvpn.c
index a892fe261..4aa37b859 100644
--- a/bgpd/bgp_mplsvpn.c
+++ b/bgpd/bgp_mplsvpn.c
@@ -1907,7 +1907,8 @@ static bool vpn_leak_to_vrf_update_onevrf(struct bgp *to_bgp, /* to */
return false;
}
- if (debug)
+ rd_buf[0] = '\0';
+ if (debug && prd)
prefix_rd2str(prd, rd_buf, sizeof(rd_buf), to_bgp->asnotation);
/* A route MUST NOT ever be accepted back into its source VRF, even if