Change in osmo-iuh[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/.

pespin gerrit-no-reply at lists.osmocom.org
Thu Aug 20 16:48:27 UTC 2020


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


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 DNS 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: I3c07e6aa0c87b752c9ea22eb4936f6993de6571f
---
M src/hnbgw.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-iuh refs/changes/42/19742/1

diff --git a/src/hnbgw.c b/src/hnbgw.c
index a47decd..9e0b33b 100644
--- a/src/hnbgw.c
+++ b/src/hnbgw.c
@@ -598,7 +598,7 @@
 
 	ranap_set_log_area(DRANAP);
 
-	rc = hnbgw_cnlink_init(g_hnb_gw, "127.0.0.1", M3UA_PORT, NULL);
+	rc = hnbgw_cnlink_init(g_hnb_gw, "localhost", M3UA_PORT, "localhost");
 	if (rc < 0) {
 		LOGP(DMAIN, LOGL_ERROR, "Failed to initialize SCCP link to CN\n");
 		exit(1);

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

Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I3c07e6aa0c87b752c9ea22eb4936f6993de6571f
Gerrit-Change-Number: 19742
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/20200820/459c6d6b/attachment.htm>


More information about the gerrit-log mailing list