fixeria has uploaded this change for review. ( 
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.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Change-Id: I5b920337409d8c9fa1edb8d47177882cf0a6c4e7
---
M src/osmo_client_vty.c
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-pcap refs/changes/40/42840/1

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: newchange
Gerrit-Project: osmo-pcap
Gerrit-Branch: master
Gerrit-Change-Id: I5b920337409d8c9fa1edb8d47177882cf0a6c4e7
Gerrit-Change-Number: 42840
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>

Reply via email to