From 5cc9a8f3fe274af6dba28594aa745fd4f8f2fcb7 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 11 Oct 2019 19:37:33 +0200 Subject: 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 --- src/osmo-bsc/osmo_bsc_sigtran.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/osmo-bsc') 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; -- cgit v1.2.3