Change in osmo-msc[master]: Change default SCTP conn NULL->127.0.0.1 to localhost->localhost

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/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Aug 24 07:44:39 UTC 2020


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-msc/+/19739 )

Change subject: Change default SCTP conn NULL->127.0.0.1 to localhost->localhost
......................................................................

Change default SCTP conn NULL->127.0.0.1 to localhost->localhost

"127.0.0.1" is changed to "localhost" to let local NSS decide whether to
use IPv4 or IPv6. In newish systems, IPv6 ::1 will be selected since
IPv6 takes precedence over IPv4.

Similarly, the default source addr needs to be changed from NULL to "localhost"
since for some yet unknwon reason, getaddrinfo(AF_UNSPEC, NULL) returns
first IPv4 "0.0.0.0" and later "::", which is inconsistent with
getaddrinfo("localhost") result, resulting in src=IPv4(0.0.0.0) and
dst=IPv6(::1), which is incompatible and will fail. In any case, since
the default remote address is a local one and it's the client side,
there's no real logical change since the kernel would anyway should have
taken a local address anyway.

Change-Id: I05a5c792ab1d053c6f38ba36d4b9fa6db293fbd0
---
M src/osmo-msc/msc_main.c
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-msc/msc_main.c b/src/osmo-msc/msc_main.c
index 98d29c3..4cda395 100644
--- a/src/osmo-msc/msc_main.c
+++ b/src/osmo-msc/msc_main.c
@@ -329,7 +329,8 @@
 	.is_config_node	= msc_vty_is_config_node,
 };
 
-#define DEFAULT_M3UA_REMOTE_IP "127.0.0.1"
+#define DEFAULT_M3UA_LOCAL_IP "localhost"
+#define DEFAULT_M3UA_REMOTE_IP "localhost"
 #define DEFAULT_PC "0.23.1"
 
 static struct osmo_sccp_instance *sccp_setup(void *ctx, uint32_t cs7_instance,
@@ -341,7 +342,7 @@
 
 	return osmo_sccp_simple_client_on_ss7_id(ctx, cs7_instance, label, default_pc,
 						 OSMO_SS7_ASP_PROT_M3UA,
-						 0, NULL, /* local: use arbitrary port and 0.0.0.0. */
+						 0, DEFAULT_M3UA_LOCAL_IP, /* local: use arbitrary port and 0.0.0.0. */
 						 0, /* remote: use protocol default port */
 						 DEFAULT_M3UA_REMOTE_IP);
 	/* Note: If a differing remote IP is to be used, it was already entered in the vty config at

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

Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Change-Id: I05a5c792ab1d053c6f38ba36d4b9fa6db293fbd0
Gerrit-Change-Number: 19739
Gerrit-PatchSet: 3
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200824/2a7bf38d/attachment.htm>


More information about the gerrit-log mailing list