summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_updgrp_packet.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-10-23 22:13:46 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2018-10-23 22:13:46 +0200
commitcbb263cf6a7cf423eb013ce713dafde9f7508a10 (patch)
tree5baec9a0a35b4e8a00d9a34ae46fe6a474d68f1f /bgpd/bgp_updgrp_packet.c
parentMerge pull request #3204 from ton31337/fix/make_vrf_import_default_selectable (diff)
downloadfrr-cbb263cf6a7cf423eb013ce713dafde9f7508a10.tar.xz
frr-cbb263cf6a7cf423eb013ce713dafde9f7508a10.zip
bgpd: When displaying default originate debugs don't print gibberish
The tx_id_buf was not being set to anything in some cases, make sure it's a null string before using. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'bgpd/bgp_updgrp_packet.c')
-rw-r--r--bgpd/bgp_updgrp_packet.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c
index 3950e2f18..c4fcea948 100644
--- a/bgpd/bgp_updgrp_packet.c
+++ b/bgpd/bgp_updgrp_packet.c
@@ -1123,6 +1123,8 @@ void subgroup_default_update_packet(struct update_subgroup *subgrp,
snprintf(tx_id_buf, sizeof(tx_id_buf),
" with addpath ID %u",
BGP_ADDPATH_TX_ID_FOR_DEFAULT_ORIGINATE);
+ else
+ tx_id_buf[0] = '\0';
zlog_debug("u%" PRIu64 ":s%" PRIu64 " send UPDATE %s%s %s",
(SUBGRP_UPDGRP(subgrp))->id, subgrp->id,