summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-10-23 13:47:06 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-10-23 16:47:33 +0200
commite21192dbb0dc45a22c2c8adb3fa2794a0b51ddb1 (patch)
tree8e6d05e905fdc78976c6728851f0c8cb83c2d7e3
parentb2ab1923278152f85d3c2186372a14caf383c632 (diff)
vty: Fix write-config of local-ip and remote-ip commands
Fixes: CID#205338 Fixes: CID#205337 Change-Id: I7b01e53aa4bfd714467cbd729cfcf4dc12a64bd4
-rw-r--r--src/osmo_ss7_vty.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 8169aaf..23607ca 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -500,7 +500,7 @@ static void write_one_xua(struct vty *vty, struct osmo_xua_server *xs)
xs->cfg.local.port, VTY_NEWLINE);
for (i = 0; i < xs->cfg.local.host_cnt; i++) {
- if (xs->cfg.local.host)
+ if (xs->cfg.local.host[i])
vty_out(vty, " local-ip %s%s", xs->cfg.local.host[i], VTY_NEWLINE);
}
if (xs->cfg.accept_dyn_reg)
@@ -698,11 +698,11 @@ static void write_one_asp(struct vty *vty, struct osmo_ss7_asp *asp)
if (asp->cfg.description)
vty_out(vty, " description %s%s", asp->cfg.description, VTY_NEWLINE);
for (i = 0; i < asp->cfg.local.host_cnt; i++) {
- if (asp->cfg.local.host)
+ if (asp->cfg.local.host[i])
vty_out(vty, " local-ip %s%s", asp->cfg.local.host[i], VTY_NEWLINE);
}
for (i = 0; i < asp->cfg.remote.host_cnt; i++) {
- if (asp->cfg.remote.host)
+ if (asp->cfg.remote.host[i])
vty_out(vty, " remote-ip %s%s", asp->cfg.remote.host[i], VTY_NEWLINE);
}
if (asp->cfg.qos_class)