Commit Graph

8 Commits

Author SHA1 Message Date
Daniel Willmann d71aa6bf20 gbproxy_peer: Add rate counters when forwarding packets fail
Change-Id: I7fa972ba843993dac84241c04d66d5b7e2a0b40f
2022-03-03 18:15:24 +00:00
Daniel Willmann f9902c5c05 gbproxy: Remove duplicate struct gprs_ra_id handling
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
2021-11-12 16:32:28 +01:00
Daniel Willmann dc763fdf39 gbproxy: Avoid sending STATUS on unexpected BLOCK_ACK
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
2021-09-29 11:35:06 +02:00
Daniel Willmann a631a3a268 gbproxy_peer: Free a cell as soon as no BSS BVC uses it
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
2021-07-16 19:15:09 +02:00
Daniel Willmann f024eeb9e7 gbproxy: Forward MS_REGISTR_ENQ/_RESP correctly
We need to save the BSS NSE <-> IMSI mapping to correctly route the
answer.

Related: OS#4472
Change-Id: I1908bbe8db11271dbd3f45b0d9f1bc0bfe48f239
2021-07-09 19:04:56 +02:00
Daniel Willmann 361d0b566a gbproxy: Add usage flag to the imsi_cache
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
2021-07-09 19:04:47 +02:00
Daniel Willmann 37518b3409 Don't route messages to an SGSN if it is down
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
2021-05-28 17:20:44 +02:00
Daniel Willmann a16ecc34cc Remove osmo-sgsn relics
* include/osmocom/sgsn -> gbproxy
* (unused) tests specific to osmo-sgsn

Change-Id: I3704760e8936bdd005a3f73727de5f2b3e8774a0
2021-03-10 13:52:07 +01:00