https://osmocom.org/https://osmocom.org/favicon.ico?16647414092018-07-29T16:37:33ZOpen Source Mobile CommunicationsOsmoMGW - Bug #3431: IP in SDP is reversedhttps://osmocom.org/issues/3431?journal_id=105312018-07-29T16:37:33Zlaforge
<ul><li><strong>Assignee</strong> set to <i>dexter</i></li></ul><p>sammachin wrote:</p>
<blockquote>
<p>I'm running: <br />osmo-mgw 1.3.0<br />osmo-bsc & msc report Version UNKNOWN</p>
</blockquote>
<p>This is extremely odd and indicates you might be experiencing build issues. Please confirm your findings - if possible - using the latest osmocom:nightly packages.</p> OsmoMGW - Bug #3431: IP in SDP is reversedhttps://osmocom.org/issues/3431?journal_id=107202018-08-10T15:03:09Zkeith
<ul></ul><p>I noticed this also, and I am wondering if it was a bug in the legacy code that was then worked around in the osmo-sip-connector (and also presumably, in the LCR when the gsm MNCC socket support was added)</p>
<p>See <a class="external" href="http://git.osmocom.org/osmo-sip-connector/tree/src/sdp.c#n168">http://git.osmocom.org/osmo-sip-connector/tree/src/sdp.c#n168</a> in sdp_create_file().</p>
<p>You can quickly work around this for further testing by removing the ntohl() in line 168:</p>
<pre><code class="c syntaxhl"><span class="o">-</span> <span class="k">struct</span> <span class="n">in_addr</span> <span class="n">net</span> <span class="o">=</span> <span class="p">{</span> <span class="p">.</span><span class="n">s_addr</span> <span class="o">=</span> <span class="n">ntohl</span><span class="p">(</span><span class="n">other</span><span class="o">-></span><span class="n">ip</span><span class="p">)</span> <span class="p">};</span>
<span class="o">+</span> <span class="k">struct</span> <span class="n">in_addr</span> <span class="n">net</span> <span class="o">=</span> <span class="p">{</span> <span class="p">.</span><span class="n">s_addr</span> <span class="o">=</span> <span class="n">other</span><span class="o">-></span><span class="n">ip</span> <span class="p">};</span>
</code></pre>
<p>I also had to force the payload type here with</p>
<pre><code class="c syntaxhl"><span class="n">other</span><span class="o">-></span><span class="n">payload_type</span> <span class="o">=</span> <span class="mi">3</span>
</code></pre>
<p>if using Full Rate</p>
<p>I have yet to track down the change that is causing the reversed IP to be sent to the MNCC socket.</p> OsmoMGW - Bug #3431: IP in SDP is reversedhttps://osmocom.org/issues/3431?journal_id=107432018-08-13T11:33:01Zkeith
<ul></ul><p>This problem was obviously noticed at 34C3 and there were some patches made to deal with it.<br /><a class="external" href="http://git.osmocom.org/osmo-sip-connector/log/src?h=lynxis%2F34c3">http://git.osmocom.org/osmo-sip-connector/log/src?h=lynxis%2F34c3</a></p>
<p>Question is, Should the byte order in osmo-sip-connector be left as it is and should we fix the byte order being sent from osmoMSC, (which is possibly coming some way from osmoMGW?)</p>
<p>If we change osmo-sip-connector, it will break with legacy openbsc and also LCR will be broken, as LCR obviously is expecting the same byte order as unpatched osmo-sip-connector (LCR works with openbsc)</p> OsmoMGW - Bug #3431: IP in SDP is reversedhttps://osmocom.org/issues/3431?journal_id=107452018-08-13T12:20:07Zlaforge
<ul></ul><p>Hi Keith,</p>
<p>On Mon, Aug 13, 2018 at 11:33:02AM +0000, keith [REDMINE] wrote:</p>
<blockquote>
<p>This problem was obviously noticed with and there were some patches made to deal with it at 34C3:<br /><a class="external" href="http://git.osmocom.org/osmo-sip-connector/log/src?h=lynxis%2F34c3">http://git.osmocom.org/osmo-sip-connector/log/src?h=lynxis%2F34c3</a></p>
<p>Question is, Should the byte order in osmo-sip-connector be left as it is and should we fix the byte order being sent from osmoMSC, (which is possibly coming some way from osmoMGW?)</p>
<p>If we change osmo-sip-connector, it will break with legacy openbsc and also LCR will be broken, as LCR obviously is expecting the same byte order as unpatched osmo-sip-connector (LCR works with openbsc)</p>
</blockquote>
<p>We should clearly use whatever method is the most compatible / least breaking one. Based on your<br />analysis, I would think one simple change to OsmoMSC should ensure best compatibility?</p>
<p>For real/proper codec negotiation from Um to SIP we'll likely need to change MNCC<br />at some not too distant point :(</p> OsmoMGW - Bug #3431: IP in SDP is reversedhttps://osmocom.org/issues/3431?journal_id=107762018-08-16T14:51:42Zkamilner
<ul></ul><p>If it's any use, I checked MGCP, and the IP addresses in the SDP appear to be correct.</p> OsmoMGW - Bug #3431: IP in SDP is reversedhttps://osmocom.org/issues/3431?journal_id=116692018-09-28T09:11:26Zdexter
<ul><li><strong>% Done</strong> changed from <i>0</i> to <i>90</i></li></ul><p>I think fixing this in osmo-sip-connector is the wrong way since this is not a bug in osmo-sip-connector. The problem is in osmo-msc, which is populating the ip struct memeber of struct gsm_mncc_rtp in the wrong byte oder. In order to make sure that this assumption is correct I checked how the SDP in the sip messages looks like when osmo-nitb is used. The IP byteorder looks correct there. Correcting the byte order in osmo-sip-connector would break osmo-nitb so fixing it in osmo-msc seems to be the right place.</p>
<p>See also: <a class="external" href="https://gerrit.osmocom.org/#/c/osmo-msc/+/11139">https://gerrit.osmocom.org/#/c/osmo-msc/+/11139</a></p> OsmoMGW - Bug #3431: IP in SDP is reversedhttps://osmocom.org/issues/3431?journal_id=116702018-09-28T09:11:33Zdexter
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul> OsmoMGW - Bug #3431: IP in SDP is reversedhttps://osmocom.org/issues/3431?journal_id=118102018-10-01T07:35:11Zdexter
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul><p>The patch made it into master, so we can close this now. However, Its still not clear to me why it worked all the time on my local machine...</p> OsmoMGW - Bug #3431: IP in SDP is reversedhttps://osmocom.org/issues/3431?journal_id=118532018-10-02T15:20:50Zosmith
<ul></ul><p>I also had the issue, and I can confirm that it's fixed with @dexter's changes. Thank you!</p>