diff options
authorPau Espin Pedrol <>2019-10-23 19:23:04 +0200
committerlaforge <>2019-10-23 18:10:10 +0000
commit1870752ca7c1665731750d2c8288c148cf348b56 (patch)
parentf0a0a4cdd78e97dc1462dbb2117c4681e471ebde (diff)
vty: ss7: Make sure ASP has at least INET_ANY addr set if not configured in VTY
Several parts of the code expect an operative ASP to always have at least one local ip addr, be it INET_ANY (NULL, or any specific IP address. This allows osmo_ss7_asp_find_by_socket_addr() matching incoming connectiongs against ASPs defined through VTY "asp" node with no "local-ip" cmd option specified. In that case, we assume the user wants it to bind/match against INET_ANY. Related: OS#3608 Fixes: 80b135581909fef595d48436ab04dbcb147e3895 Change-Id: Id4da0c778890c90cf5bfcf0fd3a7ecf165f2a6df
1 files changed, 5 insertions, 0 deletions
diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c
index 23607ca..fa3d5d1 100644
--- a/src/osmo_ss7_vty.c
+++ b/src/osmo_ss7_vty.c
@@ -1722,6 +1722,11 @@ int osmo_ss7_vty_go_parent(struct vty *vty)
switch (vty->node) {
case L_CS7_ASP_NODE:
asp = vty->index;
+ /* If no local addr was set */
+ if (!asp->cfg.local.host_cnt) {
+ asp->[0] = NULL;
+ asp->cfg.local.host_cnt = 1;
+ }
vty->node = L_CS7_NODE;
vty->index = asp->inst;