<p>neels <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/15835">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add osmo_sockaddr_str_is_nonzero()<br><br>Often, an IP address of 0.0.0.0 is considered an unset value (for clients<br>requiring a server address; not for listening on "any").<br><br>osmo_sockaddr_str_is_set() does return false when the port is 0, but there is<br>no simple way to tell whether the IP address is actually set to a server<br>address.<br><br>Add osmo_sockaddr_str_is_nonzero() to return false if:<br>- the port is zero, or<br>- the IP address is zero (0.0.0.0 or ::0), or<br>- the IP address cannot be parsed.<br><br>A practical use example: osmo-msc so far accepts an RTP IP address of 0.0.0.0<br>as valid. I noticed when trying to trigger error handling from a ttcn3 test.<br>osmo-msc can use this function to reject invalid addresses from MGCP messages.<br><br>Related: I53ddb19a70fda3deb906464e1b89c12d9b4c7cbd (osmo-msc)<br>Change-Id: I73cbcab90cffcdc9a5f8d5281c57c1f87b2c3550<br>---<br>M include/osmocom/core/sockaddr_str.h<br>M src/sockaddr_str.c<br>M tests/sockaddr_str/sockaddr_str_test.c<br>M tests/sockaddr_str/sockaddr_str_test.ok<br>4 files changed, 87 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/35/15835/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/15835">change 15835</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/libosmocore/+/15835"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I73cbcab90cffcdc9a5f8d5281c57c1f87b2c3550 </div>
<div style="display:none"> Gerrit-Change-Number: 15835 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-CC: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>