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) noreply@anthropic.com 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)