Commit Graph

687 Commits

Author SHA1 Message Date
Vadim Yanitskiy a9c380afae libosmo-{hnbap,ranap,rua,sabp}: add -no-undefined to *_la_LDFLAGS
Make sure that there is no undefined references in shared libraries.

Change-Id: I659d277049173e8fc86934140d552f6a494971a1
2022-08-04 05:32:55 +07:00
Vadim Yanitskiy c62adff36b libosmo-rua: fix copy-pasted -version-info: {HNBAP->RUA}_LIBVERSION
Change-Id: I71b859d3c9ecfaf9bffa6341291267ddef071448
2022-08-04 05:31:41 +07:00
Pau Espin f5a5e01feb Bump version: → 1.3.0
Change-Id: I7da0cc95d7b1a7198f1ae5ad5a4c0174dfd7381d
2022-06-28 18:59:56 +02:00
Harald Welte de3c2e54f1 remove obsolete notice from 7 years ago
Change-Id: If6e08325ae9e7b681d1cbb4ea0e13e5eea0a251f
2022-06-18 14:01:45 +02:00
Harald Welte 23f9c3701d update git URLs (git -> https; gitea)
Change-Id: Ifc796c7d3f6ee5e4878618f2f236024d1caeb9d4
2022-06-18 14:01:45 +02:00
Neels Hofmeyr 3ae6e812f1 move new_transp_layer_addr to public API
osmo-hnbgw will use this function in

Related: SYS#5859
Change-Id: Icc61620b4d11c4ba6823b40abc7c300f0533c058
2022-06-10 14:15:20 +02:00
Pau Espin 753a48141e Make logging message about received RANAP message more meaningful
The message being used previously seemed to indicate something was
wrong with the message. The reality is that we are simply not handling
most of them, and they will end up being forwarded as they come in

Related: SYS#5573
Change-Id: If63d942496491f1e9ee454034ec97d25764fde65
2022-06-08 14:36:10 +02:00
Philipp Maier c6e118af7a ranap_common: log decoder errors to LOGL_ERROR
Some of the custom ranap decoders use RANAP_DEBUG to log decoding
errors. This is a problem since decoder errors usually mean that a RANAP
message was somehow incompatible or wrongly formatted, which is a
serious problem. Lets log those messages to LOGL_ERROR instead.

Change-Id: Ic94cbba65719df7618c650a394e53cc59ab4e0b9
Related: OS#5152
2022-02-14 16:52:39 +01:00
Philipp Maier 55e573ca33 ranap_common: add decoder for RAB-ReleaseList
There is currently no decoder to decode RAB-ReleaseList objects properly.
Lets add one.

Change-Id: I4fc88402a863bc1482947985f759d3a26eea4164
Related: OS#5152
2022-02-14 16:44:20 +01:00
Philipp Maier 7755801cf5 ranap_common: add decoder for RAB-FailedList
There is currently no decoder to decode RAB-FailedList objects properly.
Lets add one.

Change-Id: I0f42487968f2a39f2425068c001950509a3bd28f
Related: OS#5152
2022-02-14 16:44:20 +01:00
Philipp Maier d97f94a7ea ranap_msg_factory: add missing apidoc
The functions ranap_new_msg_iu_rel_req and ranap_new_msg_rab_rel_req
lack apidoc strings.

Change-Id: I7484413980acdf17fde9ed0f97cf7f97e0ef3ae4
2022-02-10 10:47:25 +01:00
Philipp Maier 63a0cfe04e ranap_common_ran: add decoder for CN/MSC originated messages
Lets add a counterpart for ranap_common_cn that works the same, but
decodes CN/MSC originated messages.

Change-Id: Iad4c2743d4d1ddf8ad49002d1fe6866f22eb9e98
Related: OS#5152
2022-01-31 17:40:49 +01:00
Philipp Maier ca6054ef8c ranap_common_cn: add functions for direct access to decoder
The message encoder functions that decode a message to a struct
ranap_message are only accessible via a callback function that is passed
to ranap_cn_rx_cx The decoded ranap_message only lives inside the callback
since it is freed by ranap_cn_rx_cx when the callback is done. In some
situations this might make using the decoder incredibly difficult since
it is not possible to keep the decoding results for an extended amount
of time. Lets put the decoding into a separate function and use this
function in ranap_cn_rx_cx. Then lets make the decoder and the free
function public so that the decoder can be used in a more open way.

Change-Id: I14d2ed8e597a5d12024a6a6c72ff011dbeb2549d
Related: OS#5152
2022-01-28 13:21:40 +01:00
Philipp Maier fb58a448b1 test-ranap: put message gen tests into function
This unit test generats a lot of ranap messages for test, but the code
for that is in the main() function. Lets seperate this test code into
its own function like we do it in all other unit tests.

Change-Id: I7021e48b051afb6f13fdd54843d4cd92a499de2a
2022-01-13 17:20:30 +00:00
Pau Espin fd410172bf iu_client: Fix incorrect access to null pointer
Fixes: adec82f3b1
Closes: Coverity CID#243765
Related: OS#5398
Change-Id: Ib435b053241c294619c3478fe3b6450d8d181888
2022-01-13 10:41:12 +01:00
Philipp Maier bc518cf152 test_common: use osmo_init_logging2 instead of osmo_init_logging
osmo_init_logging is deprecated, lets use osmo_init_logging2

Change-Id: I00ff05e27a89f515f0ce874d6f130b2937b8f1cc
2022-01-12 13:48:19 +01:00
Pau Espin adec82f3b1 iu_client: Prevent crash if msgb passed to ranap_iu_tx has no dst
Related: OS#5398
Change-Id: I64beecd2c492d6312f60a1cf016ef022cda5252d
2022-01-11 17:08:45 +00:00
Philipp Maier c0a0b2562b iu_helpers: add function ranap_transp_layer_addr_decode2
Add ranap_transp_layer_addr_decode2 as AF agnostic version of

Change-Id: Ia60e0ab671fc4185815a880377ab88fcf1b30ac9
2022-01-11 13:16:54 +00:00
Philipp Maier 45631aa04f add unittest for ranap_transp_layer_addr_decode()
The function ranap_transp_layer_addr_decode() lacks a unit test. Lets
add one.

Change-Id: I6d7427dc07c858a8dd76c1fb536ec3df3d96f1b1
2022-01-11 13:16:54 +00:00
Pau Espin 75f77e257a osmo-iuh no longer has doc/manuals/ make target
the doc/manuals directory was dropped together with osmo-hnbgw binary
when it was moved to a separate repository recently.

Change-Id: Iceefc4e477ab516c5dc08e6c5b859c48d92a1b61
2022-01-11 13:16:08 +00:00
Philipp Maier f3ab579e99 iu_helpers: check length before accessing buf
in ranap_transp_layer_addr_decode() we access the buffer buf before
checking the length field. This can lead to a segfault when the buffer
has a length of 0.

Change-Id: I983f6e5e4cee47b3f5719829e1310b8e2e33ffaf
2022-01-10 16:05:10 +01:00
Philipp Maier ed1537e9cb iu_helpers: make new_transp_info_(rtp|gtp) public
The functions new_transp_info_rtp and new_transp_info_gtp are needed to
generate the transport layer information struct. The functions are currently
not public since they are only used in ranap_msg_factory.c but to
reqwrite the RANAP RAB AssignmentReqtest / AssignmentResponse messages we
can reuse this code, so lets make them public.

Change-Id: I1e369718de8c4c7db1f1af1e6864562164ada6cf
Related: OS#5152
2022-01-10 14:00:29 +00:00
Philipp Maier 48b8af2bde cosmetic: don't use 4 speaces instead of tabs
Change-Id: Ie9ac6e363420d1cbe4f16049740493f6edbbe36a
2022-01-09 10:04:35 +00:00
Philipp Maier 6ce5684fba ranap_common: add decoder for RAB SetupOrModifyItemFirst
The RAB SetupOrModifyItemFirst is contained in the RAB Assignment
Request. We currently have no decoder for it, so lets add one.

Change-Id: Id7293c1035cf6de34b7a416fa9265a5a32ed3216
Related: OS#5152
2022-01-09 10:04:30 +00:00
Pau Espin 0ac9844c92 Drop no longer needed systemd config in build system
It was only used to install osmo-hnbgw, which is no longer there.

Change-Id: Idae258d895d8b25dbbfb5e9bb4386997475a71dd
2022-01-07 13:39:53 +00:00
Philipp Maier 52ceee7c90 test-hnbap: cosmetic: fix sourcecode formatting
Change-Id: I1ea0d93dafed0deeb17f0788983169ed56cf7d0f
2022-01-06 13:31:22 +01:00
Philipp Maier 48612cee44 test-hnbap: remove unused variable rc
Change-Id: I8da53e0ea50ae2d6d768223b3c2070a39bf7bc1b
2022-01-06 13:31:22 +01:00
Pau Espin 140c631e50 Bump version: → 1.2.0
This version is basically 1.1.0 with osmo-hnbgw dropped, which was moved
to osmo-hnbgw.git and released as 1.2.0 there.

Change-Id: I63afc9d98cfc1d478ff2853adf5224e5f383186c
2022-01-05 12:26:51 +01:00
Pau Espin a3c221728a tests/dummy_cn_sua.c: Drop no longer existing include
This one was unspotted during last patches dropping hnbgw since this
file is actually not compiled currently.

Change-Id: I94ed20c42bcc9619d80757c6ff4a661c360bfb4f
2022-01-05 12:24:56 +01:00
Pau Espin e91b57d963 Drop osmo-hnbgw
OsmoHNBGW is now available in its own repository osmo-hnbgw.git.

Change-Id: I4e17c578b432f0c997ea4e13b1c468b112278854
2022-01-04 18:59:46 +01:00
Pau Espin 1562225332 Introduce dynamic log category for libosmo-rua/hnbap
Same as already done for libosmo-ranap.
This allows applications setting the cateogy dynamically, and will allow
untangling library tests using hnbgw log categories in this repo.

Change-Id: I5d09b67b115ad8938e5162a23accfcbafab139d4
2022-01-04 18:57:22 +01:00
Pau Espin 53052963c1 tests/tests_common.c: Add missing header
The header is probably indirectly added by osmocom/iuh/hnbgw.h, but once
that's dropped, really weird stuff happens, like talloc crashing in
talloc_total_blocks() because the compiled code incorrectly fills
msgb_ctx variable in return of msgb_talloc_ctx_init.

Change-Id: I7dab8d18d316632989406a9f22917e00a7fd68bf
2022-01-04 18:51:51 +01:00
Oliver Smith 9b4de3f401 treewide: remove FSF address
Remove the paragraph about writing to the Free Software Foundation's
mailing address. The FSF has changed addresses in the past, and may do
so again. In 2021 this is not useful, let's rather have a bit less
boilerplate at the start of source files.

Change-Id: I340ab63093138ada6e80edf322e401e9fbfef4ed
2021-12-14 12:16:45 +01:00
Pau Espin 1bc3fb4dd9 Bump version: → 1.1.0
Bump version to overcome a previous out-of-master tag 1.0.0 which is
messing some builds and creating confusion. Let's have a new 1.1.0
release tag on master.

Change-Id: I53c25e74ece6fe22c6e29bf2dd4e223e49491888
2021-11-17 11:56:26 +01:00
Pau Espin d5ce4e7d2b gitignore: Ignore libsmo-{hnbap,rua}.pc
Change-Id: Ib66ca43017447f23ea041b466a2bf122a0a4946e
2021-11-16 17:47:34 +01:00
Pau Espin ef1b61fc6c Bump version: → 0.8.0
Change-Id: Ibbef3cc3bf1f468309e73f5dda497dca1a03c815
2021-11-16 17:13:10 +01:00
Oliver Smith f8ed10a323 Cosmetic: put asn1c parameters in separate lines
Change-Id: Id1425753f9b4cbce172a1b875a680aa189bb5737
2021-11-12 13:44:34 +01:00
Oliver Smith e321f0f77f contrib/osmo-iuh.spec: fix missing ldconfig lines
Fix build failure on various openSUSE distributions in OBS, where
rpmlint runs after the build and complains about these missing
post/postun scriptlets.

Fix for:
  libosmo-hnbap0.x86_64: E: library-without-ldconfig-postin (Badness: 300) /usr/lib64/
  (none): E: badness 1200 exceeds threshold 1000, aborting.

Related: SYS#5516
Change-Id: I898aa67dbc7deaa9a8235f508a34dd29cc83b385
2021-11-03 09:22:54 +01:00
Pau Espin df5fb9adf2 hnb-test: Fix memleak in hnb_read_cb
Change-Id: I6ecbce6aab11e1382ff9f71d901e1c6ac145f835
2021-11-02 13:33:56 +00:00
Pau Espin 1ddedcfa46 ranap: Use asn1c flag -fcompound-names to avoid name collisions with other libs
Change-Id: Iba106dcc18e3d429b4b9808610a44ac29b798172
2021-10-27 17:22:50 +02:00
Pau Espin 52eabf3a55 sabp: Use asn1c flag -fcompound-names to avoid name collisions with other libs
Change-Id: I10ce4a9414768cdcf850feeca4088296e339919f
2021-10-27 17:17:43 +02:00
Pau Espin c72d654cec rua: Use asn1c flag -fcompound-names to avoid name collisions with other libs
Change-Id: Id4e337cdc82c26922b7ca7f0fe8af523e9a0945c
2021-10-27 16:53:37 +02:00
Pau Espin 41fefdb12d hnbap: Use asn1c flag -fcompound-names to avoid name collisions with other libs
Change-Id: I1bcbe047d233684647d6ffe9febb14a12c579696
2021-10-27 16:51:18 +02:00
Pau Espin 02de780ceb hnbap: Drop no longer existing asn1c param -fnative-types
This is an option enabled by default and not existent as cmdline param
since asn1c 0.9.26.

For some reason, when dropping it, asn1c generates different description
comment section on related files. In any case, this makes hnbap look
like other libraries which already got this param removed and hence also
generateds code looks the same.

Change-Id: Iccf81539a5045416185e619d24c3d542204437e6
2021-10-27 16:32:58 +02:00
Pau Espin bc7c69d170 hnbap: Use specific prefix for HNBAP generated code
Other libraries already use ASN1C_PREFIX except the HNBAP one. Let's use
it here to avoid collisions.

All new include/osmocom/hnbap/HNBAP_*.h and src/hnbap/HNBAP_*.c are
generated using the updated src/hnbap/
Files such as src/*.c, test/* and include/osmocom/hnbap/hnbap_common.h
are modified manually to update structs/enums to new prefix.

Related: SYS#5516
Change-Id: I6c062f631527ae42811bfec134933671c05ecba6
2021-10-26 16:42:07 +02:00
Pau Espin 651ff175d5 Update generated .c/.h after using asn1c -R param
Change-Id: Ib7a03973d43828f47ff59b561d9ddce43186f8af
2021-10-26 16:42:07 +02:00
Pau Espin b292db8923 src/*/ Use asn1c -R to avoid generating runtime code
Change-Id: I5666a6dc1ec9e56fe133642fb0054e913265c081
2021-10-26 16:42:07 +02:00
Pau Espin 861d9d2ebf src/*/ Copy back to srcdir the generated .c files from ASN
Change-Id: I203a25a8059218bb9fd6d10cbc028a296d347382
2021-10-26 16:41:31 +02:00
Pau Espin e395b75619 hnb-test: Fix rc var may be used uninitialized
Warning observed compiling with gcc 11.1.0.

Change-Id: I6ca53dd57572338f15971633441da895843a164d
2021-10-26 14:31:33 +02:00
Pau Espin 6334953f1c hnbgw_cn.c: Use proper type struct
Change-Id: Icc8b90866a8edce9d10c87f4ced7137edf1c46f0
2021-10-26 14:15:49 +02:00