<p>laforge <strong>submitted</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/19741">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  fixeria: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Change default SCTP conn NULL->127.0.0.1 to localhost->localhost<br><br>"127.0.0.1" is changed to "localhost" to let local NSS decide whether to<br>use IPv4 or IPv6. In newish systems, IPv6 ::1 will be selected since<br>IPv6 takes precedence over IPv4.<br><br>Similarly, the default source addr needs to be changed from NULL to "localhost"<br>since for some yet unknwon reason, getaddrinfo(AF_UNSPEC, NULL) returns<br>first IPv4 "0.0.0.0" and later "::", which is inconsistent with<br>getaddrinfo("localhost") result, resulting in src=IPv4(0.0.0.0) and<br>dst=IPv6(::1), which is incompatible and will fail. In any case, since<br>the default remote address is a local one and it's the client side,<br>there's no real logical change since the kernel would anyway should have<br>taken a local address anyway.<br><br>Change-Id: I2f599e1aa449d44136ef20ba5f516ca9b61f3223<br>---<br>M src/sgsn/sgsn_main.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/sgsn/sgsn_main.c b/src/sgsn/sgsn_main.c</span><br><span>index 257c3a2..3044f95 100644</span><br><span>--- a/src/sgsn/sgsn_main.c</span><br><span>+++ b/src/sgsn/sgsn_main.c</span><br><span>@@ -532,8 +532,8 @@</span><br><span>                                              "OsmoSGSN",</span><br><span>                                                (23 << 3) + 4,</span><br><span>                                                 OSMO_SS7_ASP_PROT_M3UA,</span><br><span style="color: hsl(0, 100%, 40%);">-                                                 0, NULL,</span><br><span style="color: hsl(0, 100%, 40%);">-                                                0, "127.0.0.1");</span><br><span style="color: hsl(120, 100%, 40%);">+                                            0, "localhost",</span><br><span style="color: hsl(120, 100%, 40%);">+                                             0, "localhost");</span><br><span>  if (!sccp) {</span><br><span>                 printf("Setting up SCCP client failed.\n");</span><br><span>                return 8;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-sgsn/+/19741">change 19741</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/osmo-sgsn/+/19741"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-sgsn </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I2f599e1aa449d44136ef20ba5f516ca9b61f3223 </div>
<div style="display:none"> Gerrit-Change-Number: 19741 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>