ss7: Set ASP default remote addr to 127.0.0.1 if none set in VTY

Similar to what we do with local address. Should fix creating the stream
when no remote address is provided on an ASP configured through VTY.

Related: OS#4260
Change-Id: I33672e76a51a5d5a483906749d30e4c4e08b66ce
This commit is contained in:
Pau Espin 2019-11-08 15:07:42 +01:00
parent 7cc8c03088
commit b92589a1a2
1 changed files with 5 additions and 0 deletions

View File

@ -1775,6 +1775,11 @@ int osmo_ss7_vty_go_parent(struct vty *vty)
asp->cfg.local.host[0] = NULL;
asp->cfg.local.host_cnt = 1;
}
/* If no remote addr was set */
if (!asp->cfg.remote.host_cnt) {
asp->cfg.remote.host[0] = "127.0.0.1";
asp->cfg.remote.host_cnt = 1;
}
osmo_ss7_asp_restart(asp);
vty->node = L_CS7_NODE;
vty->index = asp->inst;