aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-02-05rlcmac: Transform a few LOGPC messages to LOGPPau Espin Pedrol1-7/+7
Those messages are self contained and don't need LOGPC. Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307
2020-02-05Check return code of rlcmac decode/encode functionsPau Espin Pedrol5-70/+115
Change-Id: Iabcb768bd714680aa768b35c786dea2015d1e451
2020-02-05rlcmac: Return error code from csn1 encoder/decoderPau Espin Pedrol2-98/+143
Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc
2020-02-05csn1.cpp: Rework ProcessError() function to print errorsPau Espin Pedrol1-23/+26
Same API is kept to more easily keep code compatibility with wireshark's packet-csn1.c implementation. Change-Id: I1ce2c52e2357841aa1f31babfdce9011435f866b
2020-02-03cosmetic: csn1.cpp: Fix whitespacePau Espin Pedrol1-8/+7
Change-Id: I663c5c20a878b3643db6a8ddd58e29bc9fe93d80
2020-02-03gprs_bssgp_pcu: fixup: fix length check in gprs_bssgp_pcu_rx_dl_ud()Vadim Yanitskiy1-1/+1
Change-Id: I7d49b27a615350a7707154aa3cc903db7c1df374 Fixes: I7f84bd776cc780a45880f136107f6e0bc56241d1
2020-01-29gprs_bssgp_pcu: fix invalid use of non-static data member 'frame'Vadim Yanitskiy1-1/+1
The 'gprs_llc' is defined as a pure C structure with C++ specific extensions (methods), so it's rather a class. Accessing its field 'frame' statically causes Clang to throw a compilation error: gprs_bssgp_pcu.cpp:111:29: error: invalid use of non-static data member 'frame' if (len > sizeof(gprs_llc::frame)) Let's avoid this and use LLC_MAX_LEN as the size limitation. God knows what to expect from such a mix of C++ and C... Change-Id: I7f84bd776cc780a45880f136107f6e0bc56241d1
2020-01-29tests/alloc: fix implicit conversion from 'double' to 'int8_t'Vadim Yanitskiy1-1/+1
Looks pretty much like a typo. Both '-1' and '.' symbols are neighbours in QWERTZ keyboard layout, so it must be -1. Found by Clang [-Wliteral-conversion]. Change-Id: Id4eb2dcc3b44e18096c7b94efb7260e2400c596b
2020-01-29encoding: fix log_alert_exit(): do not treat error as format stringVadim Yanitskiy1-1/+1
This is rather a cosmetic change aimed to make ASAN / Coverity happy. In general, we never pass any input from an untrusted source. Change-Id: I26d654da4c3bf5fd86a298c3027fd9820c932308
2020-01-29gsm_timer: fix comparison of constant LONG_MAX with an integerVadim Yanitskiy1-10/+7
It does not make sense since INT_MAX is always less than LONG_MAX. Found by Clang [-Wtautological-constant-out-of-range-compare]. Change-Id: I9934e05aa050bf93b3c795376f5dca3a848a7e11
2020-01-28gsm_rlcmac: add dissection of NAS containerVincent Helfre2-9/+20
Port from wireshark.git 575e4df4aa3392ffd09ca372859573f09f0a5c57 Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I2a05a057b6f441364502a96f9f34872c7e251a36
2020-01-28gsm_rlcmac.cpp: fix an out of bounds accessPascal Quantin1-1/+1
Port from wireshark.git a4a5adb68b898f770e2addf9168d796979ebe237. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I23fb2199fc8f9cc3e5bd475e2558ee8d482df1e1
2020-01-28gsm_rlcmac.cpp: Do not skip too many lines of the CSN_DESCR when the field ↵Pascal Quantin1-2/+2
is missing Port from wireshark.git c4ead251da7199cfd746d378c51eb8c30d09a6ba. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: Ib9b8eafd69d3b45b0d631ba9635689807b472b73
2020-01-28gsm_rlcmac.cpp: hanged all M_BIT macros to M_UINT, as M_BIT does not use the ↵Anders Broman1-61/+61
referenced hf. Port from wireshark.git e97273a35d101516decbc7d98fcc6c6b3f193962. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: Id20d31e9ebd851b45d5f3280f3e229d8d7ae2cea
2020-01-28gsm_rlcmac.cpp: Fix trailing whitespacePau Espin Pedrol1-12/+12
Change-Id: I3b50cf386d417ba73b97f48b3000f69d9a54c8c9
2020-01-28gsm_rlcmac: Enhance dissection of PSI1Pascal Quantin2-30/+43
Port of wireshark.git 7e9411fee3a101b53693210f7a38789fd4c70ba2. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I89d488c1f349c556e40a9d13895b1309d5140212
2020-01-28gsm_rlcmac.h: Remove Uplink messages from the RlcMacDownlink_t structurePascal Quantin2-37/+16
(as they are part of the RlcMacUplink_t structure that is also used to call csnStreamDissector function). Port from wireshark.git commit 9f8b638cfa8a660fb64c54dcadb83e6747db0a15. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: If46f8cc3f21f527f911dcac6ff1b78f182104a00
2020-01-28gsm_rlcmac.h: Make sure we have a corresponding 'u' member to ↵Gerald Combs1-18/+28
RlcMacDownlink_t for every call Port from wireshark.git commit 6c32ba5ff1a5f5ec2426d1d2c4f4f37fd136bab0. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I989befc56fa37b8f982301f4f9aa4f4533e3e87a
2020-01-28gsm_rlcmac.h: #if 0 unused stuffBill Meier1-86/+107
Port of wireshark.git 2ef0c615946cd290aa9463c637169da0a1ca7972. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: Ia2e80664d293a2a95372213b4164c3e72259e0bb
2020-01-28csn1: fix this statement may fall through [-Werror=implicit-fallthrough=] ↵Alexis La Goutte1-6/+6
found by gcc7 Port of wireshark.git commit fd68c7dfc7d06ce7babe914f2575d9e4f35988ad. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: Ibaf47d7c4fdff326ac1dccf6fff77e2357e6a2bd
2020-01-28csn1: Drop format_p union from CSN_DESCRPau Espin Pedrol2-56/+51
Port of wireshark.git 8626bb4cbb4d9926f7b56663585d9ef66252f93f. We don't really need the other fields added there, let's keep only the value out of the union. Change-Id: Ia8889252ee7518a919a15d749815c2803b4b23cd
2020-01-28csn1: Try to fix cast discards '__attribute__((const))' qualifier from ↵Anders Broman1-7/+7
pointer target type Port of wireshark.git 1ff6213c949b373bcb7de5c48a5a4f805093066f. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: Ie14c335a904a17333e98ef58bf5e40245444e956
2020-01-28csn1: Don't cast away constnessGuy Harris1-1/+1
Port of wireshark.git commit 8e22ded7f8537e37e89ba558c83702d127443ae8. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I100d5c43d8878e660035bf4a64718771f41a38a8
2020-01-28csn1: Fix warning with -Wmissing-prototypesAnders Broman1-1/+1
Port of wireshark.git 2e52e2ac997ca58caabee3270b5a6c3f96159ff0. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: Ic69a75ce3f01cea326139f678b963110e895c356
2020-01-28csn1: Fix an infinite loop in CSN.1 dissector when having more than 255 ↵Pascal Quantin2-1/+2
padding bits Port of wireshark.git 8b5aa913711b32b1e1bc707919d2a98c1875d443. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I7f6aecc2c0f300c1a77cd683652969d3f1aa5794
2020-01-28csn1: Fix pedantic compiler warnings in csn.1 dissectorsPau Espin Pedrol2-56/+58
Port of wireshark.git commit 6aca10831f86c562970b13efa811f46e25ee3091. From Mike Morrin: Fix pedantic compiler warnings in csn.1 dissectors. There is some tricky casting going on in csn.1 structures. To eliminate all the warnings, the function pointers needed to be moved out of the object pointer unions. Fortunately macros (mostly) hide these changes from the protocol dissector tables. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7686 svn path=/trunk/; revision=44899 Change-Id: Ia1a8c50c4b024ca6df4e3fbbf891cd33591ccc9b
2020-01-28csn1: Allow CHOICE elements to re-process the bits used for the choicePau Espin Pedrol3-44/+47
This is a port of wireshark.git commit 2f024256bf337400ef3a82fa75e6d48d5707e059. From 78516187d821b8d19d16987b1d6bc855ee7cbe10 Mon Sep 17 00:00:00 2001 From: Sylvain Munaut <tnt@246tNt.com> Date: Sat, 4 Feb 2012 10:00:22 +0100 Subject: [PATCH 4/6] packet-csn1: Allow CHOICE elements to re-process the bits used for the choice We may want to display more detail, or the sub-element should be displayed with its headers or whatever ... Change-Id: I3a5a95d5f918b8f17a2400a6d0c4d855ecacea7e
2020-01-28csn1: Extend CSN_SERIALIZE to allow 0 bit of lengthPau Espin Pedrol1-3/+8
Port of wireshark.git 2f024256bf337400ef3a82fa75e6d48d5707e059. From c6ee558d3bb00bfd25cca7c534448bf60df3c7cf Mon Sep 17 00:00:00 2001 From: Sylvain Munaut <tnt@246tNt.com> Date: Sat, 4 Feb 2012 10:24:01 +0100 Subject: [PATCH 6/6] packet-csn: Extend CSN_SERIALIZE to allow 0 bit of length In some coding there is no 'length' field at the top of a serialized block, or it's more complex than a single field, in which case we have to rely on the serialize decoder to consume the correct number of bits. We extend the CSN_SERIALIZE processing so that if a '0 bit' length field is specified, then the length is not displayed and the consumed bits by the serialize function is taken as the length at posteriori. The processing keeps the same behavior for any length > 0. Change-Id: I9fadc99218594447001f7bb9943f4514b9877799
2020-01-28csn1: shuffle decrements of remaining_bits_lenJeff Morriss1-20/+14
So that they always occur next to an increment of bit_offset. Port from wireshark.git 1c81971d4292438ffdf83e9f9b9ab96c133c785b. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I7474e9d632e068d6e33b0a502b81d4fff1f48802
2020-01-28csn1: packet-csn1.c:179: warning: 'pui8' may be used uninitialized in this ↵Anders Broman1-1/+1
function Port from wireshark.git commit fd9f182f4b13a3d81b1b5c797a6e4b9d6d327fdd. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I37f5f3732f92cd7340af8ac1e04383f3e45e7636
2020-01-28csn1: Update M_NULL CSN_DESCR to match wiresharkAnders Broman3-4/+6
Port from iwireshark.git commit cc6d4341e65ef2e8d8488fe0ac0f236ece0dd844. It looks like it makes no difference to us now, but other EGPRS messages may use it in the future. Ported-by: Pau Espin Pedrol <pespin@sysmocom.de> Change-Id: I34039370c292e62790a38abb59f55c69fffa88e8
2020-01-28tests/rlcmac: Add test to showcase that decode_gsm_ra_cap() failsPau Espin Pedrol4-3/+49
Currently code using that function in osmo-pcu is disabled, allegadly because SGSN was sending incorrect values, but it looks more like a CSN1 issue. Related: OS#1525, OS#3499 Change-Id: I92c86397f988afaa791871d823a45fa85054f3bb
2020-01-24tests/rlcmac: Don't check stderr outputPau Espin Pedrol3-3/+2
Current stderr output is empty anyway, and not checking it allows enavling different log levels to easily debug issues. Change-Id: I5b12e919e08a6eeaad31a459e5a15fdee4d76a61
2020-01-24tests/rlcmac: Use osmo_hexdump to print buffersPau Espin Pedrol2-88/+52
Old method takes lots of lines of codes and prints inn unconfortable way because left-trailing zeros are dropped, making it difficult to split in bytes. Change-Id: I56c24f934824e4e52a91a7273aec384b2e15aa67
2020-01-24tests/rlcmac: Fix missing commas with unexpected resultsPau Espin Pedrol2-5/+29
Change-Id: Ia0f8cc224a4c38e80699f834fd83d4c0d99322ea
2020-01-24tests/rlcmac: Memzero decoded structPau Espin Pedrol1-8/+9
Otherwise final output is undefined. Change-Id: I9b501b8a99473b4d79279f8a3a9854e0b2eb3284
2020-01-23tests/rlcmac: print test name at the startPau Espin Pedrol2-0/+7
Change-Id: Ib8f0fcbd6bb68d77727c021f0d90d5248e895772
2020-01-16pcu_l1_if.cpp: fix NULL-pointer dereference in imsi2paging_group()Vadim Yanitskiy1-2/+3
Passing NULL to strlen() would lead to a segmentation fault. Change-Id: I838e3a21a3b25c2bc8260f67d156c6cc284f4456 Fixes: CID#207484
2020-01-06Support PAGING-CS and PAGING-PS on on PTP-BVCIPau Espin Pedrol1-1/+5
Related: OS#2403 Change-Id: I5c52b5af740460c48bb3ba858243b1d20e624268
2020-01-06Support Gb PAGING-CSPau Espin Pedrol1-1/+23
The paging is sent over PACCH towards MS with an active TBF. Related: OS#2406 Change-Id: I9501e02e1d7f6944497e724dbccb9a19c3f5221f
2020-01-06Allow Gb PAGING-PS without P-TMSIPau Espin Pedrol5-27/+27
P-TMSI is optional IE, but IE is mandatory and hence always available. Since the encoding is actually a Mobile Identity, the IMSI is used in case P-TMSI is not available. Change-Id: I4dbf8db04e81f98352a42ce34a5d91326be9bfd1
2020-01-06Pass paging group instead of imsi where later is not neededPau Espin Pedrol9-21/+54
Change-Id: Id0663a81f439f2d0b893b0d34f85a6db1927ef8e
2020-01-03Bump version: 0.7.0.62-fbfa-dirty → 0.8.00.8.0Pau Espin Pedrol3-5/+81
Change-Id: Ic5e69a396df659933fd4d50298b9925e837a6861
2020-01-01Split identity_lv param into mi+mi_lenPau Espin Pedrol5-9/+11
It's not really needed to have those together in some function calls, and makes it more difficult to follow the code. Furthermore, new callers not having content already aligned (len+value) will be using these functions in forthcoming commits. Change-Id: Ifb9d3997bfb74b35366c3d1bc51ce458f19abf16
2020-01-01Log BVCI PTP value upon msg recvPau Espin Pedrol1-1/+1
Change-Id: I47c5902112d568cd5a48e003010d8085b02d64e8
2019-12-31fix typo in log messagePau Espin Pedrol2-13/+13
Change-Id: Ib6fc4625242d855193b62b561624b23b265648b9
2019-12-10Fix trailing whitespacePau Espin Pedrol3-8/+8
Change-Id: I0515b5c8f6744fa501de88fa7808b7fc91981f0e
2019-12-10prs_bssgp_pcu.cpp: Mark priv funcs as static and remove trailing whitespacePau Espin Pedrol1-3/+3
Change-Id: I93b7ee33cc33c773675c85ace7b8f1afa86fbf06
2019-12-09pcu_l1_if: Check pag_req id_lv len fits bufferPau Espin Pedrol1-0/+8
Related: OS#4316 Change-Id: I803e1d2577a0d210e74feb5ca4c216375a5024ea
2019-12-04tbf_dl.cpp: Fix typo in log linePau Espin Pedrol2-125/+125
Change-Id: I9fdea4246c95897f3e72604981597db828a219a3