sysinfo: Fix regression causing missing L2 Pseudo-Length in SI5/SI6

Fixes a regression in the code generating SI5* and SI6 on SACCH,
where the L2 pseudo-length is not part of the 'struct' definition
we have in gsm_04_08.h and hence has to be encoded manually into
the first byte of the SI buffer.

We were doing this correctly until April 2017, when the following
patch was merged:

> commit 6f0e50c8337355eb59033903ede9ab6528890835
> Author: Max <msuraev@sysmocom.de>
> Date:   Wed Apr 12 15:30:54 2017 +0200
>
>     Prepare for extended SI2quater support

This patch cacidentially overwrote the l2_plen that was just enoded,
as the 'struct' was no longer pointing to 'output' (si_buf+1), but
now directly to the start of the si_buf.

NOTE: The Wireshark RSL dissector (and more recently also LAPDm)
contain a similar bug, so the SACCH will not be decoded correctly
after applying this patch. Nevertheless, it's correct.

back-port of OsmoBSC Change-Id: Ie8c907b1317566670aeb68f933ceefd552c17565
Closes: #3059
Related: #2963
Change-Id: Iaf5feefc1bb3194dd491955fee418795c61787f7
1 file changed
tree: 5db6635c6f70bfe1aee30575e3c37e7e21c67007
  1. contrib/
  2. debian/
  3. openbsc/
  4. .gitignore
  5. .gitreview
  6. .mailmap