<p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19851">View Change</a></p><p>5 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19851/1//COMMIT_MSG">Commit Message:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19851/1//COMMIT_MSG@8">Patch Set #1, Line 8:</a> <code style="font-family:monospace,monospace"></code></p><p style="white-space: pre-wrap; word-wrap: break-word;">should explain what needed to be corrected...</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19851/1/src/osmo_ss7.c">File src/osmo_ss7.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19851/1/src/osmo_ss7.c@1140">Patch Set #1, Line 1140:</a> <code style="font-family:monospace,monospace">static inline bool host_is_ipv6(const char *host)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">we already have osmo_ip_str_type() in libosmocore/include/osmocom/core/sockaddr_str.h</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19851/1/src/osmo_ss7.c@1152">Patch Set #1, Line 1152:</a> <code style="font-family:monospace,monospace">/* Expects an IPv6 address formatted string (no NULL) */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">interesting, so NULL is v4 ANY, while :: is v6 ANY?<br>That may be applied to osmo_ip_str_type() if it is generic enough?<br>(i.e. osmo_ip_str_type() returns AF_UNSPEC for NULL, maybe it should return AF_INET instead?)<br>Alternatively this code here could use something like</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  host = host ? : "0.0.0.0";</pre><p style="white-space: pre-wrap; word-wrap: break-word;">also thinking that maybe some osmo_ip_str_is_any() could be added to sockaddr_str.h</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19851/1/src/osmo_ss7.c@1168">Patch Set #1, Line 1168:</a> <code style="font-family:monospace,monospace">    bool new_is_any = host_is_ipv4_anyaddr(host) || host_is_ipv6_anyaddr(host);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">looks like a host_is_any() for both v4 and v6 would be less code</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19851/1/src/osmo_ss7.c@1191">Patch Set #1, Line 1191:</a> <code style="font-family:monospace,monospace">                                                   : host_is_ipv4_anyaddr(peer->host[i]);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">(since v4/v6 is already checked, a plain host_is_any() mentioned above would also work here)</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-sccp/+/19851">change 19851</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/+/19851"/><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: I18f3cc59149d478259d7afc456bdc5213c1406e5 </div>
<div style="display:none"> Gerrit-Change-Number: 19851 </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-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 27 Aug 2020 15:02:34 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>