<p>pespin has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19931">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Fix (2) change in ss7 server default listen addr, keeps backward-compatibility behavior<br><br>This patch is a fixup or extension of commit<br>96d348efbf29888f5ef923251c7d51d45a897c0b, which only fixed the default<br>values for "asp" VTY node, but not for the xua server's "listen" node.<br>As a result, without this patch, by default the SCTP server socket will<br>only listen on IPv4's "0.0.0.0", since NULL is resolved by getaddrinfo<br>to it instead of "::" as first candidate.<br><br>Fixes: 96d348efbf29888f5ef923251c7d51d45a897c0b<br>Change-Id: Ifbc8df854d1f1e9b07b11911ad5da8cdf9f2080a<br>---<br>M src/osmo_ss7_vty.c<br>1 file changed, 7 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmo-sccp refs/changes/31/19931/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/osmo_ss7_vty.c b/src/osmo_ss7_vty.c</span><br><span>index 3035844..109b94a 100644</span><br><span>--- a/src/osmo_ss7_vty.c</span><br><span>+++ b/src/osmo_ss7_vty.c</span><br><span>@@ -1871,8 +1871,13 @@</span><br><span>     case L_CS7_XUA_NODE:</span><br><span>                 oxs = vty->index;</span><br><span>                 /* If no local addr was set, or erased after _create(): */</span><br><span style="color: hsl(0, 100%, 40%);">-              if (!oxs->cfg.local.host_cnt)</span><br><span style="color: hsl(0, 100%, 40%);">-                        osmo_ss7_xua_server_set_local_host(oxs, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+                if (!oxs->cfg.local.host_cnt) {</span><br><span style="color: hsl(120, 100%, 40%);">+                    /* "::" Covers both IPv4 and IPv6 */</span><br><span style="color: hsl(120, 100%, 40%);">+                        if (ipv6_sctp_supported("::", true))</span><br><span style="color: hsl(120, 100%, 40%);">+                                osmo_ss7_xua_server_set_local_host(oxs, "::");</span><br><span style="color: hsl(120, 100%, 40%);">+                      else</span><br><span style="color: hsl(120, 100%, 40%);">+                          osmo_ss7_xua_server_set_local_host(oxs, "0.0.0.0");</span><br><span style="color: hsl(120, 100%, 40%);">+         }</span><br><span>            if (osmo_ss7_xua_server_bind(oxs) < 0)</span><br><span>                    vty_out(vty, "%% Unable to bind xUA server to IP(s)%s", VTY_NEWLINE);</span><br><span>              vty->node = L_CS7_NODE;</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19931">change 19931</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/libosmo-sccp/+/19931"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-sccp </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ifbc8df854d1f1e9b07b11911ad5da8cdf9f2080a </div>
<div style="display:none"> Gerrit-Change-Number: 19931 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>