diff options
authorPau Espin Pedrol <pespin@sysmocom.de>2020-08-20 12:35:07 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2020-08-21 18:07:11 +0200
commite6c5b4a9702a5729c08343001a00bd7f359a3350 (patch)
parentaae7daff81b47de37c17f2a02db2fd088e7b52cb (diff)
Change default SCTP conn NULL-> to localhost->localhost
"" 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 "" and later "::", which is inconsistent with getaddrinfo("localhost") result, resulting in src=IPv4( 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: I2f599e1aa449d44136ef20ba5f516ca9b61f3223
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sgsn/sgsn_main.c b/src/sgsn/sgsn_main.c
index 257c3a2f..3044f95e 100644
--- a/src/sgsn/sgsn_main.c
+++ b/src/sgsn/sgsn_main.c
@@ -532,8 +532,8 @@ int main(int argc, char **argv)
(23 << 3) + 4,
- 0, NULL,
- 0, "");
+ 0, "localhost",
+ 0, "localhost");
if (!sccp) {
printf("Setting up SCCP client failed.\n");
return 8;