Commit Graph

62 Commits

Author SHA1 Message Date
Max 9c2c2654ba Set working directory in systemd service file
By default systemd will execute service with root directory (or home directory for user instance) which might result in
attempts to create files in unexpected place. Let's set it to 'osmocom' subdir of state directory (/var/lib for system instance) instead.

Related: OS#4821
Change-Id: I67564759f43193f4739b0b194d5f5da92e3bc6ae
2022-08-30 19:51:47 +07:00
Vadim Yanitskiy f74f944784 configure.ac: do not require unused dlopen
Change-Id: Idd4a816babcfb2e2302fbd21cb48989659940d5c
2022-08-19 20:29:35 +07:00
Pau Espin 8ffe838a81 Bump version: 0.0.1.30-5263-dirty → 0.1.0
Change-Id: I3c3eff6d3cd473a307b36bc78cdd0654c840b36e
2022-06-29 12:37:29 +02:00
Michael Iedema 52636f32c1 typo: SAC needs 16bit range, not 8bit as copied from RAC entry
Change-Id: I756fbab449151d912cde48f1da01d3b645b7627c
2022-06-23 02:04:23 -07:00
Pau Espin 19a475bcf4 llsk: Fix previous audio sapi version passed instead of current
This bug showed up when running the whole TTCN3 hnodeb-test testsuite.
llsk_audio_sapi_version_confirmed() was setting the expected struct size
fo the version previously set.

Related: SYS#5516
Change-Id: Ic94881f46b20ba2817b56d88ada9da5d13b1e294
2022-06-21 12:39:01 +02:00
Harald Welte 71f758939a update git URLs (git -> https; gitea)
Change-Id: I64be70776dd7f3eb691c4dc8810a746c096a50ae
2022-06-18 12:12:44 +02:00
Pau Espin f320ac5841 audio: Introduce SAPI v1 with unordered RFCI support
This commit introduces support for the new llsk_audio SAPI v1.
This new version is almost the same as v0, with the exception that
primitive <REQUEST,HNB_AUDIO_PRIM_CONN_ESTABLISH> wins an extra field
appended at the end:
"""
uint8_t rfci[HNB_MAX_RFCIS]; /* values range 6 bits */
"""

This allows lowerlayers to provide an unordered array of RFCIs, which
was seen may happen under some conditions. For instance:
"""
rfci[HNB_MAX_RFCIS] = { 2, 3, 1};
[0] RFCI 2
[1] RFCI 3
[2] RFCI 1
"""

OsmoHNodeB still supports v0 if the lowerlayer asks for it, and will
continue having the exact behavior as before in this case (using
position in the array as RFCI). Hence, no compatibility breakage occurs
in this patch. New clients, on the other hand, can provide the extra
information by announcing V1 support during version negotiation at
startup.

Related: SYS#5516
Change-Id: I860d18b80c1041bf63a1570d435e0568c0f6b01b
2022-06-08 18:38:37 +02:00
Pau Espin 780def0114 llsk: Validate received SAPI versions at startup
Change-Id: I172abfee3bfadb383aa6bce6fe76306291c7cd7f
2022-06-08 18:06:09 +02:00
Pau Espin 0843c8ae6e hnb: move llsk fields inside substruct
More fields will be added, let's better organize them this way.

Change-Id: Idfe644a7c2eccd94b602816a86e38b56264141af
2022-06-08 18:03:38 +02:00
Pau Espin fc660017e8 llsk: Fix typo in log message
Change-Id: I3c8be85e56df23cd68e58f0112238647add3d97f
2022-06-08 18:03:35 +02:00
Pau Espin 3dffff3147 rtp: Update code to libosmogsm IuUP API changes
NOTICE: This commit implies an API change when using libosmogsm.
However, the previous API was never available in any libosmogsm release,
and only available in both libosmogsm and osmo-hnodeb master, so we are
only breaking compatibility between different master versions, which is
acceptable.

Related: SYS#5969
Change-Id: Ia26a945147d68511bb1750d51ed91909e48b4139
2022-05-25 18:55:09 +02:00
Pau Espin 8875abd3f9 Do not turn some compiler warnings into errors by default
We build with --enable-werror during development and in CI. If the code
is built with a different compiler that throws additional warnings, it
should not stop the build.

This patch also effectively removes dependency on autoconf-archive.

Related: OS#5289
Related: SYS#5789
Change-Id: Ie30d8024ee2ad48073dd8be2e02856b6ce1a6b0b
2022-01-11 18:30:57 +01:00
Pau Espin 70b65c55f6 gtp: Fix uninitialized var if no extension flags set in gtp header
The logic was plain wrong, bug introduced while typing initial code.

Closes: Coverity CID#243535
Change-Id: I497667edd0571fff91ab41c8b57bdcf277e5988d
2022-01-07 13:44:31 +01:00
Pau Espin 14cceb5dfb Get rid of libgtp for GTP-U
It doesn't make much sense to pull whole libgtp to implement only the
user plan side of GTP. Let's drop it and add a minimal GTP-U
implementation here.

Related: SYS#5516
Change-Id: I53ad4915aaed3bc7574036e963be10514e370fe2
2021-12-23 15:55:21 +01:00
Pau Espin e4f127f1a3 Add initial support for IuUP RTP based Transport Layer
Use the recently introduced IuUP support in libosmocore to send and receive
proper IuUP over RTP instead of regular RTP.
The LLSK AUDIO primitives are updated to provide required information
back and forth.

Depends: libosmocore.git Change-Id Ibe356fa7b1abaca0091e368db8478e79c09c6cb0
Related: SYS#5516
Change-Id: Ie137809e1f91dfd702853c52be97ca79e8604eab
2021-12-23 15:55:17 +01:00
Pau Espin 387b892b1d Add example default config file
This config file is also installed and used by the systemd service by
default. Local ip address of 127.0.0.3 is used by default to avoid
collisions with default configs of osmo-sgsn and osmo-ggsn.

Related: OS#5360
Change-Id: I02d628f48ca5adbc46e75a015c39a6fb5614a2d6
2021-12-20 11:57:57 +01:00
Pau Espin 272f296cd3 gtp: Fix possible null pointer dereference
Closes: Coverity CID#242771
Change-Id: I412082cc5fa93818d321210c34a2d22c038cb985
2021-12-17 13:45:36 +01:00
Pau Espin 5869201039 contrib/osmo-hnodeb.spec.in: Fix missing dep libosmotrau
Change-Id: Ia40b6a28caecdd94ce3c53172fe531b12a0a221f
2021-12-17 13:40:41 +01:00
Pau Espin 64d8fd6298 llsk_audio: Fix false positive about uninitialized var access
Let's make gcc in Ubuntu 21.10 happy.

Change-Id: If085b0ca0e1d3e7237696eb67cf6301ea84793e0
2021-12-17 13:37:32 +01:00
Pau Espin 3363db5c90 llsk_gtp: Early return if conn alloc fails
Change-Id: Iaf597b76ceb9cce3f27c42625f963f740c8f213e
2021-12-17 13:35:36 +01:00
Pau Espin 381c4cccc5 rtp: Use dynamic Payload Type 96
Change-Id: I6ca83c274200d8fc0fb3d8914e970b05df91f6ea
2021-12-16 13:01:13 +01:00
Pau Espin 7550ba3d05 Update AUDIO and GTP SAPs to support multiple conns per UE
This is needed for instance:
* AUDIO: video calls
* GTP: secondary pdp contexts

For better abstraction, now both AUDIO and GTP conns use unique ID
namespaces, and one ID is used to identify each one. Each conn relate in
turn to a UE since a context_id is passed during connection
establishment.

Related: SYS#5516
Change-Id: Ib3f60d5ba21defe5259c25e2034fc2217c4d93df
2021-12-16 13:01:12 +01:00
Pau Espin ecc76ef69a Fix several Coverity found issues
Closes: CID#242770
Closes: CID#242769
Closes: CID#242767
Change-Id: I6d73a970919889953539fbacc601d679d7ec4113
2021-12-16 12:58:51 +01:00
Pau Espin a7dc04ef26 First implementation of the LLSK gtp SAPI
This first implementation uses libgtp to manage the GTPv1-U socket and
pdp contexts, as a proof of concept to have something working for now.
At a later step, it is expected to drop libgtp and use some adhoc code
to handle GTP-U.

Related: SYS#5516
Change-Id: I5a6f5dfc4e508c92adb35210b4dc576d64353366
2021-12-14 15:47:53 +01:00
Pau Espin b3af382157 First implementation of the LLSK audio SAPI
This first version can send and receive regular RTP, but does not talk IuUP.
Support for IuUP will be added in a future patch. This way we can
already test the whole LLSK<->RTP path.

Change-Id: I9909a7c054ddaabb1bb63d7d06331cc79f642b5d
2021-12-14 12:43:19 +01:00
Pau Espin cd1baf0649 Initial implementation of LowerLayer UD Socket
The LLSK socket is an interface allowing thid-parties to implement and
hook their RLC/MAC/RRC stack to osmo-hnodbe, which takes care of
interconnection with the rest of the RAN and core network (Iuh, RTP,
GTP-U, etc.).

Related: SYS#5516
Change-Id: Icaabb2206d6f141d4fba47dedf71f8ec37e6257d
2021-12-14 12:43:15 +01:00
Pau Espin d8da64bb46 Drop NAS and RANAP code and VTY commands
The higher level bits were used in originally imported hnb-test code in
order to control interaction with the HNBGW over the VTY. This is no
longer needed in osmo-hnodeb, as NAS is in layers above the ones being
handled by an hNodeB.
Regarding RANAP, most of it is going to be handled by the LowerLayer UD
socket peer to be introduced in the future, so we can drop most of it,
as in osmo-hnodeb we'll basically be speaking RUA to the HNBGW and
passing RANAP buffers transparently.
We keep the .c/.h files since some small helpers functions will be
ntroduced later on when adding support for the mentioned LL socket.

Related: SYS#5516
Change-Id: I6aae54734c1c4607beede19169f16bafe35b3a61
2021-11-30 11:02:52 +01:00
Pau Espin 5689081325 hnbap: Improve rx path and implement HnbRegisterReject
The process is shut down if we receive such a message.

Change-Id: Id4656140b7f51b07860dcbeed449ed68c3a9f85a
2021-11-24 21:31:32 +01:00
Pau Espin 807e52a2da Implement initial shutdown + reconnect FSM
The shutdown_fsm doesn't do much right now, but it's included there in
order to allow easy clean up of resources upon Iuh reconnect in the
future, as well as reset the lower layers.

Change-Id: Id35d692218af366843186b0966b62f65bb9eb620
2021-11-24 21:23:45 +01:00
Pau Espin fd440b7a67 Fix typos and non-related test content
Artifacts from initial commits adding the project skeleton.

Change-Id: I00cce8fbfeef9688dd2fd235cb859c27bd864e8b
2021-11-24 21:22:42 +01:00
Pau Espin 65489ed7c6 iuh: Improve logging of SCTP notifications
Change-Id: I08842665effec6e70a3c7f6b93ea62c45549d69d
2021-11-24 21:22:42 +01:00
Pau Espin 9828dbed18 Introduce SCTP log category
Change-Id: I2c9cb54958807bd68c04a4c0d3a0f355dd641282
2021-11-24 21:22:42 +01:00
Pau Espin 4310b0d57a Move Iuh code to its own module
The Iuh code will be further extended next to properly support
reconnect, and hnb will also gain proper shutdown support soon.

Change-Id: I6e94210ab06a34b70c61bb074c58d7b0f4ee75de
2021-11-24 21:22:38 +01:00
Pau Espin 7465e42bed Bump version: 0.0.0 → 0.0.1
Change-Id: I7c561ce54d8c2ff2cad8f66685016ab71991138e
2021-11-16 18:29:42 +01:00
Oliver Smith 7657886220 gitignore: add src/osmo-hnodeb/osmo-hnodeb
Change-Id: I6bfb0b0696b8910c3f095390d6634f49baeebb14
2021-11-03 09:08:05 +01:00
Oliver Smith 33e4059c05 rpm spec: fix invalid file paths
Fix for:
  File not found: /home/abuild/rpmbuild/BUILDROOT/osmo-hnodeb-0.0.0.202111021358-1.1.arm/usr/share/doc/packages/osmo-hnodeb/examples/osmo-hnodeb/*/osmo-hnodeb*.cfg
  File not found: /home/abuild/rpmbuild/BUILDROOT/osmo-hnodeb-0.0.0.202111021358-1.1.arm/usr/share/doc/packages/osmo-hnodeb/README

With this patch applied, the deb and rpm packages build successfully now
(verified in own OBS namespace).

Related: SYS#5516
Change-Id: I3c728489d38272d8477da5050f407708b8c4289b
2021-11-03 09:08:05 +01:00
Oliver Smith 4de0518d22 d/control, spec: add missing builddeps
autoconf-archive is apparently needed to build the package. We have it
in few other Osmocom projects as build dependency too, others seem to
ship related m4 macros directly in a m4 dir.

Fix for:
  configure: error: Please install autoconf-archive; re-run 'autoreconf -fi' for it to take effect.

Related: SYS#5516
Change-Id: If9ff232844d72094fb883700185ae152ca40493d
2021-11-03 09:08:00 +01:00
Pau Espin c40d445506 ranap: Fix compiler warnings passing func callback
Fixes following warning types:
"passing argument 1 of ‘ranap_cn_rx_co’ from incompatible pointer type
[-Wincompatible-pointer-types]"

Change-Id: If80b57a8d36c28dee7db28cb36a88ed41e0a7328
2021-11-02 12:41:14 +01:00
Pau Espin b80125f5c9 hnb.c: Fix memleak in hnb_iuh_read_cb
Port from osmo-iuh.git Change-Id I6ecbce6aab11e1382ff9f71d901e1c6ac145f835.

Change-Id: If5d5d41693e26f485aa5372129dccf0dcfb7fa6c
2021-11-02 12:41:14 +01:00
Pau Espin 72ef4c0cd4 Generate proper rnc_id and plmn in LuRequest
Change-Id: Ib40b5eb96b7cc13c424076a4ca725019514d52af
2021-11-02 12:41:14 +01:00
Pau Espin c475158e0c Configure HNB-Identity over VTY and use it in HnbRegisterRequest
Change-Id: Ida47bbb85b5438a2ec9805005bc2ab834c79b765
2021-11-02 12:41:14 +01:00
Pau Espin e2c17101be Configure CI,LAC,RAC,SAC over VTY and use it in HnbRegisterRequest
Change-Id: I06f21758e361b7d4d7141086d758893bee434e5c
2021-11-02 12:41:14 +01:00
Pau Espin 3423fada07 Configure PLMN over VTY and use it in HnbRegisterRequest
Change-Id: I6d67aa547d5496fe1407744e1dde07d2a41df500
2021-11-02 12:41:14 +01:00
Pau Espin b4cc30ae1d Send HnbRegisterRequest when HnodeB connects on Iuh
Change-Id: I901fd456221a3bdc3f4f95b7fd3b9484c7830f24
2021-11-02 12:41:14 +01:00
Pau Espin feb5d9a1c7 use osmo_stream_cli to manage sctp Iuh conn
Let's use already available functionality to handle the conn for us.
This is specially useful since we gain a connect_cb.

Change-Id: I9d884231577aa47af22cd6319130ca5c9e595d61
2021-11-02 12:41:14 +01:00
Pau Espin 5b86a80193 Use osmocom logging in non-main files
Change-Id: I649b17803aeffd20354aa76dde61094959f08e43
2021-11-02 12:41:14 +01:00
Pau Espin 9b5e3d46d0 hnb: Move wqueue to .iuh, add wrapper to use it
Change-Id: I38498858fc315ad3d57644d7b905f5393f43e884
2021-11-02 12:41:14 +01:00
Pau Espin 5c84fd43d9 Drop unused fields in struct hnb
Change-Id: Ia981d99bf521eb8b79bdf8d7f81ca50f6cdeba8c
2021-11-02 12:41:14 +01:00
Pau Espin bf3cb41af5 Set up Iuh conn params through VTY
Change-Id: Id5a17742643e8f02c22228e3055bcc213423a416
2021-11-02 12:41:14 +01:00
Pau Espin 5e3098d56a More work on main.c to add osmocom functionalitites
Change-Id: I61a5ee2e100f79cef7e42dbd981e308597c30900
2021-11-02 12:41:14 +01:00