Change in osmo-bsc[master]: sigtran: Set default remote ip to localhost instead of null

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Fri Oct 11 17:38:54 UTC 2019


pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/15780 )


Change subject: sigtran: Set default remote ip to localhost instead of null
......................................................................

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
---
M src/osmo-bsc/osmo_bsc_sigtran.c
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/80/15780/1

diff --git a/src/osmo-bsc/osmo_bsc_sigtran.c b/src/osmo-bsc/osmo_bsc_sigtran.c
index 0bf48a7..543e6de 100644
--- a/src/osmo-bsc/osmo_bsc_sigtran.c
+++ b/src/osmo-bsc/osmo_bsc_sigtran.c
@@ -44,6 +44,7 @@
 #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 @@
 		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;
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/15780
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib0d33c66faab78e609742638425cb8a0c382406f
Gerrit-Change-Number: 15780
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20191011/3aa88270/attachment.htm>


More information about the gerrit-log mailing list