diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-10-23 16:13:46 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-10-23 16:13:46 -0400 |
| commit | cbb263cf6a7cf423eb013ce713dafde9f7508a10 (patch) | |
| tree | 5baec9a0a35b4e8a00d9a34ae46fe6a474d68f1f /bgpd/bgp_updgrp_packet.c | |
| parent | 0abf76d5192121b63405b1b535a70441e5cf857e (diff) | |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/bgpd/bgp_updgrp_packet.c b/bgpd/bgp_updgrp_packet.c index 3950e2f18f..c4fcea948f 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, |
