https://osmocom.org/
https://osmocom.org/favicon.ico?1664741409
2020-02-13T19:01:40Z
Open Source Mobile Communications
OsmoPCU - Feature #4382: osmo-pcu: Check port of remaining wireshark.git patches to gsm_rlcmac.cpp/h
https://osmocom.org/issues/4382?journal_id=17425
2020-02-13T19:01:40Z
fixeria
<ul><li><strong>File</strong> <a href="/attachments/4028">vector1.dec</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4028/vector1.dec">vector1.dec</a> added</li></ul><p>Unfortunately, <a class="external" href="https://gerrit.osmocom.org/c/osmo-pcu/+/17050">https://gerrit.osmocom.org/c/osmo-pcu/+/17050</a> breaks the unit test.</p>
<pre>
vector1 = 4016713dc094270ca2ae57ef909006aa0fc0001f80222b
=========Start DECODE===========
+++++++++Finish DECODE (0)++++++++++
=========Start ENCODE=============
+++++++++Finish ENCODE (0)+++++++++++
vector1 = 40 16 71 3d c0 94 27 0c a2 ae 57 ef 90 90 06 aa 0f c0 00 1f 80 22 2b
vector2 = 40 16 71 3d c0 94 27 48 a2 ae 57 ef 90 90 06 aa 00 00 1f 80 00 3f 00
vector1 == vector2 : FALSE
</pre>
<p>I have no idea why, but I hope <a href="https://github.com/P1sec/pycrate" class="external">Pycrate</a> can help us to narrow down the problem.</p>
<pre><code class="python syntaxhl"><span class="kn">from</span> <span class="nn">pycrate_csn1dir</span> <span class="kn">import</span> <span class="n">uplink_rlc_mac_control_message</span>
<span class="kn">from</span> <span class="nn">binascii</span> <span class="kn">import</span> <span class="n">unhexlify</span>
<span class="c1"># NOTE: the first octet should be skipped (MAC header)
</span><span class="n">vector1</span> <span class="o">=</span> <span class="n">unhexlify</span><span class="p">(</span><span class="s">'16 71 3d c0 94 27 0c a2 ae 57 ef 90 90 06 aa 0f c0 00 1f 80 22 2b'</span><span class="p">.</span><span class="n">replace</span><span class="p">(</span><span class="s">' '</span><span class="p">,</span> <span class="s">''</span><span class="p">))</span>
<span class="n">vector2</span> <span class="o">=</span> <span class="n">unhexlify</span><span class="p">(</span><span class="s">'16 71 3d c0 94 27 48 a2 ae 57 ef 90 90 06 aa 00 00 1f 80 00 3f 00'</span><span class="p">.</span><span class="n">replace</span><span class="p">(</span><span class="s">' '</span><span class="p">,</span> <span class="s">''</span><span class="p">))</span>
<span class="n">msg1</span> <span class="o">=</span> <span class="n">uplink_rlc_mac_control_message</span><span class="p">.</span><span class="n">uplink_rlc_mac_control_message</span><span class="p">.</span><span class="n">clone</span><span class="p">()</span>
<span class="n">msg2</span> <span class="o">=</span> <span class="n">uplink_rlc_mac_control_message</span><span class="p">.</span><span class="n">uplink_rlc_mac_control_message</span><span class="p">.</span><span class="n">clone</span><span class="p">()</span>
<span class="n">msg1</span><span class="p">.</span><span class="n">from_bytes</span><span class="p">(</span><span class="n">vector1</span><span class="p">)</span>
<span class="k">print</span><span class="p">(</span><span class="n">msg1</span><span class="p">.</span><span class="n">show</span><span class="p">())</span> <span class="c1"># See vector1.dec attached
</span><span class="n">msg2</span><span class="p">.</span><span class="n">from_bytes</span><span class="p">(</span><span class="n">vector2</span><span class="p">)</span> <span class="c1"># decoding fails: pycrate_core.charpy.CharpyErr: bitlen overflow: 1, max 0
</span></code></pre>
OsmoPCU - Feature #4382: osmo-pcu: Check port of remaining wireshark.git patches to gsm_rlcmac.cpp/h
https://osmocom.org/issues/4382?journal_id=17426
2020-02-13T19:08:33Z
pespin
<ul><li><strong>Assignee</strong> changed from <i>4368</i> to <i>pespin</i></li></ul>
OsmoPCU - Feature #4382: osmo-pcu: Check port of remaining wireshark.git patches to gsm_rlcmac.cpp/h
https://osmocom.org/issues/4382?journal_id=17871
2020-03-26T20:14:37Z
pespin
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>90</i></li></ul><p>I have been doing a second iteration over wireshark commits for rlcmac and csn1 files, and submitted a couple more patches:<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/osmo-pcu/+/17628">https://gerrit.osmocom.org/c/osmo-pcu/+/17628</a> rlcmac: support decode FDD_CELL_INFORMATION of "UTRAN FDD Description<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/osmo-pcu/+/17629">https://gerrit.osmocom.org/c/osmo-pcu/+/17629</a> rlcmac: add dissection of 2G->3G/4G PS handover</p>
<p>I also did some fixes in csn1/rlcmac of both osmo-pcu and wireshark:<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/osmo-pcu/+/17632">https://gerrit.osmocom.org/c/osmo-pcu/+/17632</a> csn1: Properly verify CSN_BITMAP length<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/osmo-pcu/+/17633">https://gerrit.osmocom.org/c/osmo-pcu/+/17633</a> csn1: Remove code block from CSN_NEXT_EXIST_LH<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/osmo-pcu/+/17628">https://gerrit.osmocom.org/c/osmo-pcu/+/17628</a> rlcmac: support decode FDD_CELL_INFORMATION of "UTRAN FDD Description<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/osmo-pcu/+/17629">https://gerrit.osmocom.org/c/osmo-pcu/+/17629</a> rlcmac: add dissection of 2G->3G/4G PS handover<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/osmo-pcu/+/17630">https://gerrit.osmocom.org/c/osmo-pcu/+/17630</a> csn1: Fix Several typos & whitespace<br />remote: <a class="external" href="https://gerrit.osmocom.org/c/osmo-pcu/+/17631">https://gerrit.osmocom.org/c/osmo-pcu/+/17631</a> csn1: verify enough bits present to decode whole CSN_UINT_ARRAY</p>
<p>remote: <a class="external" href="https://code.wireshark.org/review/36589">https://code.wireshark.org/review/36589</a> GSM RLC/MAC: fix typo in comment<br />remote: <a class="external" href="https://code.wireshark.org/review/36590">https://code.wireshark.org/review/36590</a> GSM RLC/MAC: Drop extra empty line<br />remote: <a class="external" href="https://code.wireshark.org/review/36591">https://code.wireshark.org/review/36591</a> CSN.1: verify enough bits present to decode whole CSN_UINT_ARRAY<br />remote: <a class="external" href="https://code.wireshark.org/review/36592">https://code.wireshark.org/review/36592</a> CSN.1: Optimize update of remaining_bits_len dissecting CSN_UINT_ARRAY<br />remote: <a class="external" href="https://code.wireshark.org/review/36593">https://code.wireshark.org/review/36593</a> CSN.1: Properly verify CSN_BITMAP length</p>
<p>I identified patches for 2 different topics which I didn't back-port because I have the feeling they are of no use to us:<br /><pre>
Enhancemnt to GSM RLCMAC dissection adding dissection of data block headers
12e5e625a6ce7f214d111f8e48f12d5104144b53
cc6d4341e65ef2e8d8488fe0ac0f236ece0dd844
</pre></p>
<p>So unless somebody reasons in a different way, I think we are done with porting stuff from packet-gsm_rlcmac.* and packet-csn1.* from wireshark.git (at wireshark.git commit 2f6a692fcdc17a6eb332cbc3e2d546ac5c14d951 at the time of writing).</p>
<pre>
92ef3d0b55a37f042e1ce7e208e7f39cb49b9bce GSM RLC/MAC: add dissection of EC-GSM-IoT control messages
</pre>
OsmoPCU - Feature #4382: osmo-pcu: Check port of remaining wireshark.git patches to gsm_rlcmac.cpp/h
https://osmocom.org/issues/4382?journal_id=18054
2020-04-22T18:08:41Z
pespin
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li></ul>