There're no calls to the function before actual declaration so
forward declaration serves no purpose, just pollutes 'git grep' results.
Change-Id: Id8bce05ef347df93202a77b817a10903acaa9d97
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: I5117ab8d7b8542a161f69a9784a9667bda599473
Previously the SGSN BVCs would still be present after the related Cell
was freed. This caused some inconsistencies if a BVC with the same BVCI
was established again. The symptoms of this were cells that were attached
to no SGSN or the same one multiple times and crashes.
This patch ensures that the SGSN-side BVCs are also freed when the cell
is freed and that this fact is reflected when handling reset
notifications.
Change-Id: Iedeede8917e2870e0b62a2050ccb331109167017
The BVCI IE is listed as conditional and is only included if the flush
action indicates that LLC-PDUs are transferred. (3GPP TS 48.018 Ch.
10.4.2).
The code in gbprox_rx_sig_from_bss unconditionally tries to get a BVCI
from a FLUSH_LL message which could result in a segfault if no such IE
is included. Routing towards the SGSN can happen simply based on TLLI (for pooling)
since there is only one signalling BVC towards the SGSN.
Related: OS#5332
Change-Id: I659f9c925bb38b8cf2348b84b976142d8d4693f7
The ra_id as well as the cell_id are already present in struct
gbproxy_cell which is reachable from bvc->cell. Remove the ra_id in
struct gbproxy_bvc and also remove some unused/unneeded code. The FSM
reset_notif callback already takes care of updating the cell.
Related: OS#4894
Change-Id: Ibc9f42a60706612c17e5f8f0468c7faced5ae4c8
Do not turn some compiler warnings into errors by default. This patch
was added before --enable-werror was available.
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 reverts commit 34f012639ddf41470714ae74ae961d158670a4c7.
Related: OS#5289
Change-Id: I2fb777410ffc181feabd6aee3beda3ed05ba5c90
This code was copied in BSS and SGSN PTP receive functions and also in
the functions that extract the inner PDU-in-error from the STATUS PDU.
Use a central function for less code duplication and better
maintainability.
This also fixes TTCN3 test TC_status_ptp_ul_tlli the c&p omitted the
special handling of UL/DL unitdata.
Related: OS#4892
Change-Id: I882aa97b0f4158affe45e81e4e4701bd36ef89f7
Derive a foreign TLLI from a TMSI and route the message according to it
Fixes TC_status_sig_ul_tmsi
Related: OS#4892
Change-Id: Iebda9e9fd433cd28c0f657adc4d475d4e6e247ba
Handle SGSN BVCs that are gone from the BSS differently.
The previous patch removed the gbproxy_bvc on the SGSN-side after it was
gone on the BSS-side. This caused a STATUS response to BVC_BLOCK_ACK messages
that should be valid. Instead of removing the BVC this patch marks it as
inactive so we can still handle BVC_BLOCK_ACK correctly, but ignore
other messages - especially BVC_RESET from the SGSN.
Related: SYS#5628. OS#5236
Change-Id: Ic9f34a27412d6e15ca1198ee140f66a076b5c6b6
If we keep the bvc around the SGSN could send a BVC-RESET which the
gbproxy would ACK. This will reestablish the BVC only between the gbproxy and
SGSN which can lead to all sorts of issues.
With this patch the gbproxy will respond with a BVC-STATUS cause BVCI
unknown.
Related: SYS#5628
Fixes: OS#5236
Change-Id: Ib14be6425a81b43353708b2708f79e035e501079
Both ctrl commands gbproxy-state and number-of-peers should only
operate on PtP-BVCs. This patch avoids a crash in gbproxy-state and
fixes the count of number-of-peers to only include PtP-BVCs.
Related: SYS#5542, OS#5200
Change-Id: Ida5f9ad0a16b991e77eec0e3cdb779dcfa472fab
ctrl_nsvc_state_cb() expects us to pass a struct nsvc_cb_data so do that
instead of passing only the ctrl_cmd.
Related: OS#5200, SYS#5542
Change-Id: I8bc67cc9bc90dab9cfca30b062d1d78897aa1e51
This patch adds gbproxy_cell_cleanup_bvc() which removes the bvc pointer
to the cell. If the BSS BVC of this cell is removed it frees the whole
cell (removing all the SGSN BVC pointers to the cell). The SGSN-side
BVCs are blocked at this point and will only be reestablished if this
BVC is reset again from the BSS.
Before this patch cells were never freed and might accumulate over time.
They would only be reused if the bvci matched that of a previous cell.
Related: OS#4960
Change-Id: Ib874cbebcea58fa4bf15e1ff40fe11601573e531
This is only used for the imsi cache entries for now. Further uses will
be added in subsequent commits.
Related: OS#4472
Change-Id: I4a4b8c99eb97f6bb5387d0f26aecd861e07d9914
If an SGSN in a pool is down we expect the messages to instead be sent
to a different SGSN in the pool. That SGSN will not necessarily know
what to do with those messages, but it should (implicitly) detach that
UE so that it can reattach at the new SGSN. Otherwise UEs on a failed
SGSN would simply stop working as the messages would never be forwarded
anywhere.
Fixes: OS#4952
Change-Id: I3f794659866e1f31496a39ca631b3b042a60aa27
Adjust the config, so osmo-gbproxy and osmo-sgsn can be started with
their default configs on the same machine.
Fixes: OS#5130
Change-Id: I7959ea8ebd1f5c60177f37dd6eb01724308e0fc0