Commit Graph

639 Commits

Author SHA1 Message Date
Pau Espin 6f66feb42d tests: Fix trailing whitespace
Change-Id: I3ef7a3f1c3247615619a0d01c92d8f80572b0dfe
2020-05-19 20:32:58 +00:00
Oliver Smith 0e3a02776c contrib: import RPM spec
Copy the RPM spec file from:
https://build.opensuse.org/project/show/home:mnhauke:osmocom:nightly

Related: OS#4550
Change-Id: Ic3f146c1eb5b5d02277ec869516a1ec95987d4cd
2020-05-14 11:46:12 +02:00
Harald Welte 7712808e07 Fix compilation with gcc-10
/usr/bin/ld: test_common.o:(.bss+0x0): multiple definition of `talloc_asn1_ctx'; test-helpers.o:(.bss+0x0): first defined here

See also https://alioth-lists.debian.net/pipermail/debian-mobcom-maintainers/Week-of-Mon-20200413/000652.html

Change-Id: I4ce41158bb27e6b9242613106f226fc86995c53c
2020-04-20 20:01:53 +02:00
Philipp Maier 554dbf4fb7 hnbgw: do not use LOGL_DEBUG as default loglevel
The hnbgw application uses LOGL_DEBUG for all its log categories. This
is way to verbose, lets set LOGL_NOTICE as default loglevel instead.

Change-Id: If3dbed88307814764bab9e7f1821e1dc0d8be43b
Related: OS#2577
2020-04-14 13:19:52 +00:00
Eric Wild 8d88271570 configure.ac: fix libtool issue with clang and sanitizer
As pointed out at https://github.com/libexpat/libexpat/issues/312
libtool does not play nice with clang sanitizer builds at all.
For those builds LD shoud be set to clang too (and LDFLAGS needs the
sanitizer flags as well), because the clang compiler driver knows how
linking to the sanitizer libs works, but then at a later stage libtool
fails to actually produce the shared libraries and the build fails. This
is fixed by this patch.

Addtionally LD_LIBRARY_PATH has no effect on conftest runs during
configure time, so the rpath needs to be set to the asan library path to
ensure the configure run does not fail due to a missing asan library,
i.e.:

SANS='-fsanitize=memory -fsanitize-recover=all -shared-libsan'
export CC=clang-10
ASANPATH=$(dirname `$CC -print-file-name=libclang_rt.asan-x86_64.so`)
export LDFLAGS="-Wl,-rpath,$ASANPATH $SANS $LDFLAGS"

Change-Id: I74cdca5c8bd5a32b6fb05906280cc1cdd64e9369
2020-04-11 01:18:34 +02:00
Vadim Yanitskiy 065c192475 tests/test-ranap: cosmetic: remove unused variable 'rc'
Change-Id: Ie931d11efd7bb083558852a7f329c984c17fec62
2020-04-07 21:11:13 +07:00
Vadim Yanitskiy 81fd48d741 tests/test-helpers: fix endianness: do not print uint32_t as raw bytes
This unit test would not pass on big-endian machines.

Change-Id: I60dbcaa89b031c9a81c35e1dd0d9c963d486014c
2020-04-07 21:05:37 +07:00
Vadim Yanitskiy 89062aeb21 tests/test-helpers: fix some -Wpointer-sign warnings reported by GCC
Change-Id: I7ebc99fe919fe7ba515c9d8ba601dceb820bf11f
2020-04-07 21:01:12 +07:00
Neels Hofmeyr a959dd90d2 manual: link to new common cs7-config.adoc
Related: OS#2767
Depends: Ia2508d4c7b0fef9cdc57e7e122799a480e340bf7 (osmo-gsm-manuals)
Change-Id: I531b272f49edcbf4194603e554b535b83a1e5780
2020-03-30 18:19:33 +02:00
Neels Hofmeyr 50865f8a6f manual: add "Configuring Primary Links" and "Multiple instances"
Change-Id: I0919392b716e2812ff19d7efa5d1ba535b08eb91
2020-03-30 18:19:30 +02:00
Pau Espin 35e2058348 hnbgw_vty.c: Drop unusued variables
Change-Id: Ic7f730c9f51384006e471b5e8452f5821b458bbf
2020-03-20 20:35:06 +01:00
Pau Espin a008b17f2e Fix compiler warning on signedness of char ptr using OCTET_STRING_fromBuf()
rua_msg_factory.c:19:48: warning: pointer targets in passing argument 2 of ‘OCTET_STRING_fromBuf’ differ in signedness [-Wpointer-sign]

Change-Id: Ie0a2e8e11902dc56720ff8121edde0e148fa587a
2020-03-20 20:32:26 +01:00
Pau Espin ca74126d54 tests/test-ranap.c: Fix wrong printf format
Caught by compiler:
test-ranap.c:54:30: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘RANAP_MaxBitrate_t’ {aka ‘long int’} [-Wformat=]
test-ranap.c:78:30: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 2 has type ‘RANAP_CauseMisc_t’ {aka ‘long int’} [-Wformat=]

Change-Id: Icc4e81beaa35e13aea3adfed983016c78b730061
2020-03-20 20:23:04 +01:00
Pau Espin 4ab00db868 tests/hnb-test-ranap.c: Fix wrong printf format
Catched by compiler:
hnb-test-ranap.c:76:44: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘RANAP_CN_DomainIndicator_t’ {aka ‘long int’} [-Wformat=]

Change-Id: Ie4cd6a36fd0e9a871a1815d600e8a321a3d2a208
2020-03-20 20:19:49 +01:00
Martin Hauke c593da5d45 tests: Missing return statement
Change-Id: I4fae9f84a83af280846b07eaa139ff4a05784a2e
2020-02-15 23:01:39 +01:00
Pau Espin 67d32a0386 Bump version: 0.5.0.23-11a1 → 0.6.0
Change-Id: I5f42c0ad1a930004415f097d984e1fd1b2d277e6
2020-01-03 17:04:15 +01:00
Pau Espin d5d3efb546 debian: Split libosmo-sabp from libosmo-ranap package
Related: OS#4342
Change-Id: I936220e95a3334d8052bb2c52fbf335a8a5c3711
2020-01-03 14:46:22 +01:00
Pau Espin d48430d4fb debian/rules: Fix dbg pacakges
Related: OS#4342
Change-Id: I5e0e13a1d4fa7db373807d72d293da6933966452
2020-01-03 14:44:12 +01:00
Vadim Yanitskiy 11a1639b2d osmo-hnbgw: make sure osmo_ss7_init() executed successfully
Change-Id: Ia9ecf903e79b282aa4fa88a291424681d0fe9d89
Fixes: CID#206089
2020-01-01 14:05:57 +01:00
Oliver Smith 16441ffbb3 debian, asn1tostruct.py: switch to python3
Make build work with python3 and drop the python2 dependency.

Related: OS#2819
Change-Id: Idb9d7a349ddb7619c784823f740648c7956bae5e
2019-12-11 11:37:21 +01:00
Oliver Smith 08699f6636 gitignore: add gen_sabp.stamp
Change-Id: I107d2c0e8c82523a8fb38f128bb81e32e437bdd8
2019-12-11 09:23:58 +01:00
Harald Welte cc0914d018 exit(2) on unsupported positional arguments on command line
Change-Id: Id33caf93325074f9e5b2b322ac497b1c21c3f406
2019-12-03 21:53:08 +01:00
Harald Welte 6d839f5354 Initial minimal OsmoHNBGW user manual
This adds a very basic OsmoHNBGW user manual with an "overview" and
"running" chapter.  It still misses any information on configuration.

Change-Id: I54825a4ce5a457f87b0618332347eed8ea54afcb
Closes: OS#2588
2019-12-01 14:21:01 +01:00
Alexander Couzens 9fb8cac6dc iu_client: ranap_iu_tx_release() change default cause code to Success
The cause code no remaining rab should be only used when closing the
Iu connection on this specific reason. Change default to NAS Success
Release which is a usual release.

Change-Id: Icf3f06b0de7dcda9f967ae29863054ef813c75e5
2019-10-08 13:02:11 +02:00
Alexander Couzens a6eb09d6db iu_client: pass return value of osmo_sccp_user_sap_down() towards the caller
osmo_sccp_user_sap_down return 0 on success, negative values on failure

Change-Id: I3b7c2296eb8b26f0881cee643b834336daab86ea
2019-10-03 20:30:31 +02:00
Harald Welte e844bf7828 sabp: Generate C/H files for SABP; create libosmo-sabp
This uses the (modified) Osmocom asn1c on the (modified) SABP ASN.1
syntax to generate C code + header files for SABP parsing/encoding.

It also adds some helper code for message encoding and decoding as well
as a new libosmo-sabp shared library which can be used by programs to
implement SABP related functionality.

Change-Id: Ib9580d1af96354398da4c9f97b28a0e23d56e275
2019-09-23 20:23:51 +02:00
Harald Welte 7095c7ed0c sabp: Add Procedure Codes and IEI constants to CommonDataTypes
... this is what's required for asn1c to generate nice C language
enums for it.  Conversion was performed semi-automatically by use
of asn1enum.pl

Change-Id: I0cd78a102ec6e31c696efc2cc6a4f08a0ba6d89e
2019-09-21 09:41:46 +02:00
Harald Welte f7f85ef092 sabp: fixup SABP ASN.1 to avoid IOC (which are not supported by our toolchain)
Change-Id: I8211bc334b325e8950edcd769917f164a65591ba
2019-09-21 09:41:46 +02:00
Harald Welte d673facccd sabp: Initial import of SABP ASN.1 from 3GPP TS 25.419 V11.1.0 (2013-03)
They cannot immediately be consumed by our (ancient, hacked) asn1c
toolchain, so we have to massage them into the supported format
in follow-up commits.

Change-Id: I9fa05d14493889e0a23354938b04a335a117f242
2019-09-21 09:41:34 +02:00
Harald Welte 175cc0f710 asn1enum.pl: Make compatible with modern perl
This fixes the following error message:
Experimental keys on scalar is now forbidden at ./asn1enum.pl line 25.

Change-Id: I4680627acfd8f3ed73d32324fe0a54b554268f3b
2019-09-20 22:10:50 +00:00
Pau Espin 965d53348e hnbgw: Add libosmoctrl's VTY CTRL command initialization
Otherwise, the "ctrl" VTY node is not available and CTRL ip address
cannot be set.

Change-Id: I73f64b951690ec23f829c4855b2caeefa66ad35d
2019-09-20 17:21:23 +02:00
Alexander Couzens 32fc82a803 iu_client: introduce UE field free_on_release
Allow to free UE ctx when receiving a Iu Release Complete.
In preparation of ranap_iu_tx_release_free() it requires
a field to free the Iu ctx on it's own without depending
on the upstream user.

Change-Id: Iac41cd3cce3232d01b2f7ede0cc46226c2cfb6c0
2019-09-16 13:57:50 +00:00
Alexander Couzens ff79699b48 iu_client: introduce ranap_iu_tx_release_free()
ranap_iu_tx_release_free is a fire and forget function to release
gracefully if possible. It first sends a Iu Release Command. After
a certain timeout the connection will be released.

Change-Id: I349e2c61ba0131e233b7ab927dfced0bd461dd8f
2019-09-15 20:42:30 +02:00
Alexander Couzens 8e2a0ee8e2 iu_client: allow to control the notifications
The iu_client is informing the library user about global event.
In prepration to the tx_iu_release_free() call allow to
disable upstream notificatiosn

Change-Id: Ic93ef6fd54c995405e9c37a5e0c53f81a89850b7
2019-09-12 01:34:37 +02:00
Alexander Couzens 790212fcaf iu_client: introduce a guard around global_iu_event_cb
As preparation to enable and disable notifications for a specific ue connection,
add a slim proxy before calling global_iu_event_cb

Change-Id: I49a3402a871d6dccd343cda49f8a7f82bffe150b
2019-09-10 19:10:50 +02:00
Alexander Couzens efdd80dc0a iu_client: emit RANAP_IU_EVENT_LINK_INVALIDATED on SCCP disconnect indication
Change-Id: I168b5c67336c4d1cb9fcebb9c26a7cf2fc46e420
2019-09-03 18:44:34 +02:00
Alexander Couzens 609994d146 iu_client: introduce ranap_iu_free_ue() to free the UE connections
When freeing the UE connection object, disconnect the SCCP connection.

Change-Id: I6812edb4da487507ccf9f483de801c1c65c4b72b
2019-09-03 18:44:27 +02:00
Alexander Couzens 4ae261b89b iu_client: sccp_sap_up: don't decode empty disconnect indications
Change-Id: I1fea8f19433d908583de71d8d2401bbb8c0c7900
2019-09-03 18:40:57 +02:00
Alexander Couzens 87482b335c iu_client: ensure UE is not NULL on CO primitives
When ue_conn_ctx_find() can not find a UE it returns NULL.

Change-Id: I63222fda6778417b1c986cb05772fecc51c43bb5
2019-09-03 16:42:07 +02:00
Alexander Couzens 80307924f1 iu_client: sccp_sap_up: set rc early
Allows to skip assignment later.

Change-Id: Idd803774612719df144bef569fb734289aa31282
2019-09-03 16:42:06 +02:00
Vadim Yanitskiy dab16ff3f5 hnbgw_vty.c: fix: properly pass pointer to g_hnb_gw
Otherwise the process hangs if the user enters:

  $ show hnb NAME

hnbgw_vty.c: In function ‘show_one_hnb’:
hnbgw_vty.c:234:2: warning: passing argument 1 of
                   ‘hnb_context_by_identity_info’
		   from incompatible pointer type
		   [enabled by default]
iuh/hnbgw.h:154:21: note: expected ‘struct hnb_gw *’
                    but argument is of type ‘struct hnb_gw **’

Change-Id: I42fdb10af5f6427886b5797325830dfc212af30f
2019-08-23 00:30:40 +02:00
Pau Espin 505fa9eae7 Bump version: 0.4.0.14-92ea-dirty → 0.5.0
Change-Id: I53c1743eda203bf075f93f891e336ca4ec6866a8
2019-08-07 21:23:57 +02:00
Pau Espin 92ea15a53f Remove undefined param passed to {logging,osmo_stats}_vty_add_cmds
Since March 15th 2017, libosmocore API logging_vty_add_cmds() had its
parameter removed (c65c5b4ea075ef6cef11fff9442ae0b15c1d6af7). However,
definition in C file doesn't contain "(void)", which means number of
parameters is undefined and thus compiler doesn't complain. Let's remove
parameters from all callers before enforcing "(void)" on it.

Change-Id: I31a286bebe3229671d9960ae32a753d260a26b1d
Related: OS#4138
2019-08-05 14:49:35 +02:00
Daniel Willmann d4a0a77319 jenkins: Enable manual publishing and building
Related: OS#2589
Change-Id: Ic7437daeab0b07d16fd71ca3881cb31bab7b1925
2019-07-30 11:28:51 +02:00
Daniel Willmann dc468e6442 Add VTY reference manual
Fixes: OS#2589
Change-Id: I042734fa9979b598d5471839e408cbf39bba57b5
2019-07-29 12:11:22 +02:00
Oliver Smith 30301f263c osmo-hnbgw.cfg: set local-ip to 0.0.0.0
Make the config work out of the box for anyone.

Related: OS#3369
Change-Id: I354140f014854f1755b649e40a65e5d88b99c0ec
2019-07-17 14:04:48 +02:00
Thorsten Alteholz 445bdccffa spelling stuff found by lintian
Change-Id: I8434640701746d5db8707472d1d26c313e0814e9
2019-07-16 21:48:47 +02:00
Oliver Smith 89ccf5517c contrib/jenkins.sh: run "make maintainer-clean"
Related: OS#3047
Change-Id: I6f9274efeb2fdda54feaa54eb299f7aafaaec1eb
2019-07-10 12:29:06 +02:00
Harald Welte 11b1ddee21 ranap_msg_factory: Fix criticality of PDUs
Seveal of our RANAP messages were using criticality values at the
PDU level differing from what RANAP_PDU_Descriptions.asn states
for the respective procedures.  Let's fix that.

This was discovered while working on the initial IuCS TTCN3 tests,
where the receive templates require the criticality to match.

Change-Id: I98eec0bdc0d0cb1b9284bd5d042b1f4403abef95
2019-04-20 22:53:49 +02:00
Harald Welte 8fa35b840c iu_client: Implement transmission of ResetAcknowledge
When receiving an Iu Reset, respond with Iu ResetAcknowledge.

Closes: OS#3944
Change-Id: Ia09752983a7e2a952aa144635924edbffd894058
2019-04-20 21:13:12 +02:00