Commit Graph

664 Commits

Author SHA1 Message Date
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.1.0.5-a3c2 → 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: 0.8.0.1-d5ce4 → 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.7.0.27-f8ed-dirty → 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/libosmo-hnbap.so.0.0.0
  ...
  (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/Makefile.am.
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/*/Makefile.am: Use asn1c -R to avoid generating runtime code
Change-Id: I5666a6dc1ec9e56fe133642fb0054e913265c081
2021-10-26 16:42:07 +02:00
Pau Espin 861d9d2ebf src/*/Makefile.am: 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
Pau Espin 5310f5458e hnbgw_rua.c: Use proper type struct
Change-Id: I9e21b504e4fac072d8481d0a699bc58d1b94a12d
2021-10-26 13:50:36 +02:00
Oliver Smith 6a77d1ffa5 contrib/osmo-iuh.spec.in: fix header packaging
Fix the conflict from having %{_includedir}/* in multiple packages by
replacing it with the correct subdir path.

Fix for:
  found conflict of libosmo-hnbap-devel-0.7.0.11.b110.202110260026-1.1.armv7hl with libosmo-ranap-devel-0.7.0.11.b110.202110260026-1.1.armv7hl:
    - /usr/include/osmocom/hnbap/Access-stratum-release-indicator.h
    - /usr/include/osmocom/hnbap/AccessResult.h
    - /usr/include/osmocom/hnbap/AdditionalNeighbourInfoList.h
  ...

I've verified that it builds again in my own OBS namespace.

Related: SYS#5516
Fixes: 35f2bd ("Provide libosmo-hnbap as a public shared library")
Fixes: dba8b0 ("Provide libosmo-rua as a public shared library")
Change-Id: Ia401caf01fa9ea351f811d7c22a04ccff556d6bc
2021-10-26 09:21:02 +02:00
Pau Espin b1103fc8e3 README.md: Document how to re-generate code from ASN1 files
Change-Id: Ie3e5b7fb88caf2a795fccdcf214f559f9683070c
2021-10-22 23:19:06 +02:00
Pau Espin 44481e435e move-asn1-header-files.sh: Replace original asn file path in generated asn1 header files
This makes builds reproducible and keep the existing relative path.
This should have been done in a previous commit changing the paths being
passed to asn1c to be absolute (top_srcdir).

Fixes: f67803684f
Change-Id: I19537f136cbb654950172ee532027920d353a556
2021-10-22 23:15:31 +02:00
Pau Espin dba8b0c334 Provide libosmo-rua as a public shared library
It is needed by the new osmo-hnodeb project.

Related: SYS#5516
Change-Id: I8b800baacbfe3a3c424c51b418b5ac2e2848b3ba
2021-10-22 15:43:17 +02:00
Pau Espin 35f2bd60ae Provide libosmo-hnbap as a public shared library
It is needed by the new osmo-hnodeb project.

Related: SYS#5516
Change-Id: I0d0862e9d59d3b206f3f7dfae4b39ae4032bb762
2021-10-22 15:42:27 +02:00
Pau Espin 2127a71515 src/*/Makefile.am: Fix trailing whitespace
Change-Id: Ie22df146cfaf6aaf9c7cef884a964e6a3dfcc8ad
2021-10-22 15:42:05 +02:00
Pau Espin 40c1729c61 src/tests/Makefile.am: Drop reference to non-existent RANAP_FILES var
It was no longer needed since .la was used.

Change-Id: I3f196d5c2bb35826709bfc32d10e6b3683b552ee
2021-10-21 15:06:03 +02:00
Pau Espin 6f1de40430 cosmetic: src/ranap/Makefile.am: Drop trailing whitespace
Change-Id: I934b7be7ca1fac05410df6640428ee8e9c70c3e7
2021-10-21 14:57:37 +02:00
Pau Espin 1f6c117d07 hnb-test: Fix typo in vty cmd description
Change-Id: Id33e2e8caa37dc359d564188747cd4c1b8bc4064
2021-07-05 12:18:47 +02:00
Pau Espin 7fcd33df8c ranap_iu_tx_release_free(): always trigger RANAP_IU_EVENT_IU_RELEASE as a result
This allows the SGSN always having feedback on the resolution of the
release, hence being able to stay in PMM CONNECTED state until the
resolution is received, then moving to PMM IDLE.

Related: SYS#5389
Change-Id: Iac822c74e56750dc40e94573eae0e20853ff68c0
2021-04-14 17:45:12 +02:00
Pau Espin 68a796ebc5 iu_client: Log event sent to upper layer callback
Change-Id: I2233df2b09ae46f28dd99d7540d71fee8e47b6ff
2021-04-13 17:36:49 +02:00
Harald Welte 09d635ce9b hnbgw: Add missing break statement
We don't want to print usage information after the VTY reference XML.

Change-Id: Ia729134a8f18d53274bbc063aa39508c7dcc1f72
2021-02-24 09:00:01 +01:00
Pau Espin c1385f2986 Bump version: 0.6.0.49-356f-dirty → 0.7.0
Change-Id: I3b592c39646a77681efde5debb5ac2a844208949
2021-02-23 20:11:59 +01:00
Harald Welte 356f49e723 manuals: generate vty reference xml at build time
Remove hnbgw_vty_reference from the source tree.

In manuals/Makefile.am use the new BUILT_REFERENCE_XML feature recently added
to osmo-gsm-manuals, and add a build target to generate the XML using the new
osmo-hnbgw --vty-ref-xml cmdline switch.

Change-Id: Ia1e978ad9139c41368cd2720c339e1738d345c4a
Depends: I613d692328050a036d05b49a436ab495fc2087ba
Related: OS#5041
2021-02-23 19:55:03 +01:00
Pau Espin ff8c223440 Workaround ASan report memleak during call to --vty-ref-xml
For some unknown reason, using size=0 instead of 1 makes LeakSanitizer
report a leak when calling osmo-hnbgw --vty-ref-xml:
"""
==19857==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 96 byte(s) in 1 object(s) allocated from:
    #0 0x7f083b4d0d28 in malloc (/usr/lib/x86_64-linux-gnu/libasan.so.3+0xc1d28)
    #1 0x7f083a8e5661 in talloc_named_const (/usr/lib/x86_64-linux-gnu/libtalloc.so.2+0x6661)
"""

It seems iu_client.c is already using size=1.

Change-Id: I383653c981e68a053babd33dee1f0df8731752b0
2021-02-23 19:55:03 +01:00
Pau Espin 79d001fcb6 hnbgw: Avoid re-defining same global variable twice
This global variable is already defined in iu_client.c provided by
libosmo-ranap (and used by libasn1c).
Fixes ASan warning at starutp.

Change-Id: I7dbae83ce0dc4ac25dc10879e223280414f7b561
2021-02-23 19:08:48 +01:00
Harald Welte d24839fea0 main: add --vty-ref-mode, use vty_dump_xml_ref_mode()
Change-Id: If07b00e928fbecc596a7f75fc55e811bd9199b72
Depends: Ie2022a7f9e167e5ceacf15350c037dd43768ff40
Relates: OS#5041
2021-02-23 17:44:47 +01:00
Pau Espin a94752e684 tests: Replace deprecated API log_set_print_filename
Change-Id: Ic53a0a9afb8038759bb3ab1d4c5970f23632e84e
2021-02-19 13:19:01 +01:00
Pau Espin 2c6aed38bd tests: Explicitly drop category from log
Let's disable category here since we don't care about its formatting here.

In any case, every test relying on logging output validation should
always explicitly state the config to avoid issues in the future if
default values change.

Change-Id: Ia633cae0a26f294e276b431a82256abb1b57ebba
Related: OS#5034
2021-02-19 13:18:42 +01:00
Harald Welte e8299eb745 ranap_msg_factory: Fix LOGP statements
The related compiler warnings were overlooked as due to the
asn1c-generated code there always are tons of warnings printed compiling
this project :(

Change-Id: I40b1265ba696501cc72e674f3ef4146c47aacf1b
2021-02-11 10:15:37 +01:00
Harald Welte e3f707b8c6 ranap_msg_factory: Allow detailed control over UEA/UIA algorithm encoded
Change-Id: I6d2d033b0427bdc84fee61e0f3cb7b29935214bf
Closes: OS#4143
2021-02-08 18:34:02 +01:00
Harald Welte f05c5bf6cd hnbgw: Use LOGHNB() to add log context information to log lines
So far we don't really have any way of matching a given log message
to a specific hNB.  Let's use the newly-introduced LOGHNB() macro.

Change-Id: Ia16eed4ca5e9ef231259e94c65105f7586f366bc
2021-02-03 08:45:04 +00:00