laforge has submitted this change. (
https://gerrit.osmocom.org/c/osmo-pcap/+/42840?usp=email )
Change subject: client: vty: do not print NULL tls hostname
......................................................................
client: vty: do not print NULL tls hostname
conn->tls_hostname defaults to NULL and can be cleared via "no tls
hostname". Writing it unconditionally emitted a "tls hostname (null)"
line, producing a config that does not re-parse. Guard it like the
other optional tls fields.
Change-Id: I5b920337409d8c9fa1edb8d47177882cf0a6c4e7
AI-Assisted: yes (Claude)
---
M src/osmo_client_vty.c
1 file changed, 2 insertions(+), 1 deletion(-)
Approvals:
laforge: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/osmo_client_vty.c b/src/osmo_client_vty.c
index 127e52f..6648417 100644
--- a/src/osmo_client_vty.c
+++ b/src/osmo_client_vty.c
@@ -74,7 +74,8 @@
{
if (conn->tls_on) {
vty_out(vty, "%s enable tls%s", indent, VTY_NEWLINE);
- vty_out(vty, "%s tls hostname %s%s", indent,
conn->tls_hostname, VTY_NEWLINE);
+ if (conn->tls_hostname)
+ vty_out(vty, "%s tls hostname %s%s", indent,
conn->tls_hostname, VTY_NEWLINE);
vty_out(vty, "%s %stls verify-cert%s", indent,
conn->tls_verify ? "" : "no ", VTY_NEWLINE);
if (conn->tls_capath)
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcap/+/42840?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I5b920337409d8c9fa1edb8d47177882cf0a6c4e7
Gerrit-Change-Number: 42840
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>