<p>Harald Welte <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/9359">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  Jenkins Builder: Verified
  Harald Welte: Looks good to me, approved

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">mgcp_network: do not log destination invalid ip/port as error<br><br>It is legal to create connection without setting the destination<br>ip and port (this usually done later through MDCX). However, if<br>some other connection tries to deliver an RTP packet through a<br>a half open connection, then the fact that no destination ip is<br>set is logged as error even if it is a pretty normal situation.<br><br>- Check if destination ip and port are set to zero. If yes, we<br>  assume that the destination connection details are intentionally<br>  not set yet. Only when one value is set and the other one not,<br>  we log an error. Otherweise we log a message to debug.<br><br>Change-Id: If96e5a60b8ab92259d3bddaa143121893bb6c525<br>Related OS#3104<br>---<br>M src/libosmo-mgcp/mgcp_network.c<br>1 file changed, 9 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/src/libosmo-mgcp/mgcp_network.c b/src/libosmo-mgcp/mgcp_network.c</span><br><span>index 4144382..2da37b4 100644</span><br><span>--- a/src/libosmo-mgcp/mgcp_network.c</span><br><span>+++ b/src/libosmo-mgcp/mgcp_network.c</span><br><span>@@ -867,6 +867,15 @@</span><br><span>    struct mgcp_endpoint *endp;</span><br><span>  endp = conn->conn->endp;</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+    /* Note: it is legal to create a connection but never setting a port</span><br><span style="color: hsl(120, 100%, 40%);">+   * and IP-address for outgoing data. */</span><br><span style="color: hsl(120, 100%, 40%);">+       if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0 && conn->end.rtp_port == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+           LOGP(DRTP, LOGL_DEBUG,</span><br><span style="color: hsl(120, 100%, 40%);">+                     "endpoint:0x%x destination IP-address and rtp port is (not yet) known\n",</span><br><span style="color: hsl(120, 100%, 40%);">+                   ENDPOINT_NUMBER(endp));</span><br><span style="color: hsl(120, 100%, 40%);">+          return -1;</span><br><span style="color: hsl(120, 100%, 40%);">+    }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>  if (strcmp(inet_ntoa(conn->end.addr), "0.0.0.0") == 0) {</span><br><span>                LOGP(DRTP, LOGL_ERROR,</span><br><span>                    "endpoint:0x%x destination IP-address is invalid\n",</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/9359">change 9359</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/9359"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-mgw </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: merged </div>
<div style="display:none"> Gerrit-Change-Id: If96e5a60b8ab92259d3bddaa143121893bb6c525 </div>
<div style="display:none"> Gerrit-Change-Number: 9359 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>