aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2019-10-11 19:37:33 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2019-10-11 19:37:35 +0200
commit5cc9a8f3fe274af6dba28594aa745fd4f8f2fcb7 (patch)
tree32f1fe9b8ebcb46e9b9a3c947d43bc8cf60cbec7
parent120746e66f5a9dda8e4a511327fb26fa834be2eb (diff)
sigtran: Set default remote ip to localhost instead of null
NULL or 0.0.0.0 should actually not be used upon connect() calls. Whoever, it worked so far because osmo_sock_init2() calls getaddrinfo() on it which does the 0.0.0.0->127.0.0.1 translation. osmo-msc already passed 127.0.0.1 as default address, so let's do the same here. Change-Id: Ib0d33c66faab78e609742638425cb8a0c382406f
-rw-r--r--src/osmo-bsc/osmo_bsc_sigtran.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index 0bf48a75f..543e6de58 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -44,6 +44,7 @@ static struct llist_head *msc_list;
#define RESET_INTERVAL 1 /* sek */
#define SCCP_MSG_MAXSIZE 1024
#define CS7_POINTCODE_DEFAULT_OFFSET 2
+#define DEFAULT_ASP_REMOTE_IP "127.0.0.1"
/* The SCCP stack will not assign connection IDs to us automatically, we
* will do this ourselves using a counter variable, that counts one up
@@ -514,7 +515,7 @@ int osmo_bsc_sigtran_init(struct llist_head *mscs)
default_pc = osmo_ss7_pointcode_parse(NULL, BSC_DEFAULT_PC);
msc->a.sccp =
osmo_sccp_simple_client_on_ss7_id(msc, msc->a.cs7_instance, msc_name, default_pc,
- msc->a.asp_proto, 0, NULL, 0, NULL);
+ msc->a.asp_proto, 0, NULL, 0, DEFAULT_ASP_REMOTE_IP);
if (!msc->a.sccp)
return -EINVAL;