Commit Graph

13 Commits

Author SHA1 Message Date
Pau Espin a33f00637e Use new stat item/ctr getter APIs
Generated with spatch:
"""
@@
expression E1, E2;
@@
- &E2->ctr[E1]
+ rate_ctr_group_get_ctr(E2, E1)
"""

Change-Id: I2e064883ac6dafa89e41a297a886a9ebd26ce925
2021-06-04 17:27:05 +02:00
Pau Espin 922684f318 gprs_ranap.c: Clean up code path releasing IU conn
Let's always send the event to the FSM and keep logic of whether it's a
good event to sent or not inside the FSM, not in the caller.
The logic is kept the same: if the event is not expected (not handled),
keep forcing free of the IU connection.
In theory this should never happen since only a PMM in Connected state
should have a established connection (hence only a PMM in Connected
state can have it released). In any case let's keep the safety check,
but let the FSM receive the event and log an error about unexpected
event, which is more interesting from debug point of view.

While at it, clean up the related logging line: There's no need to print
the imsi explicitly, since LOGMMCTXP already does it. Furthermore, print
the exact low level event which triggered the code path.

Related: SYS#5389
Change-Id: I45017562ea7f27c2248b7de56f99ce7ca88e89b2
2021-04-14 12:42:02 +02:00
Pau Espin 183e6c3367 ranap: log ranap iu event type name instead of number
Change-Id: If66e9d5989b46abe01855a5c1183d567d358abeb
2021-03-25 15:54:45 +01:00
Alexander Couzens f23e2db752 sgsn: Use the new NS2 api
The new NS2 api supports NSE with multiple NS-VC and contains a NS-VC
fsm. FR/GRE support is not working.
The configuration is compatible except for FR/GRE.

Relates: OS#4629
Depends-on: Iaad7b53d44338e5dd81dc2202f23bdcb715af804 (libosmocore)
Depends-on: I6cef42749555e577d5573f2ed8b8bce4cf842a98 (libosmocore)
Change-Id: I92a3bcaf166b091a22d74c7c1586964d33d7cc9d
2021-01-04 16:06:13 +00:00
Alexander Couzens afadd102bf ranap: add non-spec X1001
When the SGSN releases a RANAP connection, it sends a Release Command
and waits for a Release Complete. Use X1001 to release the Iu connection
when the Release Complete is lost/never received.

Change-Id: I39a0169c22a4ac430b3d6f3c281d1f381eaa4756
2019-10-08 20:31:25 +00:00
Alexander Couzens 743e687496 gprs_ranap: add missing rc = 0
After processing the event, set the return code to success.
Thanks to manatails (redmine).

Change-Id: I73b3b3c3dd330bc953835737758854cf68539495
Fixes: #3969
2019-10-08 12:02:19 +00:00
Alexander Couzens 62f6f9aebf gprs_ranap: on Iu release, stop the attach fsm if running
A Iu release should stop any active procedure.

Change-Id: I78c6c0c4024657212d6abef51e226ce233018fee
2019-10-08 10:34:28 +00:00
Alexander Couzens eb5aee580d gprs_ranap: release Iu UE Context when exiting PMM Connected
PMM Connected defines a Iu signaling connection. The 2 other
PMM states do not have an active Iu signaling connection.

Change-Id: Ie05d2bdf8dfb593b4c7e837107a3a06f22e90119
2019-10-03 20:29:37 +00:00
Alexander Couzens e30f19542b Avoid compiling unneeded files when building without Iu
Remove gprs_ranap.c and gprs_mm_state_iu_fsm.c
from the Makefile when building without IU.

Change-Id: I2386f8e86bbf0b87eedce9f57eb86b1b64998a69
2019-10-03 19:51:03 +00:00
Alexander Couzens 1cb4be9db0 gprs_ranap: refactor REQUIRE_MM define
All branches need a MM context. Exit early if no MM context
present.

Change-Id: Ifa4c55f1f2c199fa63bd755311026b8586a65f3f
2019-09-12 01:43:16 +02:00
Alexander Couzens 10b3d70fea gprs_ranap: send CommonId after receiving Security Mode Complete
After Security Mode Complete, the sender has been authenticated.
Send a CommonId to enable paging coordination between CS and PS.

Change-Id: If195c26e87ba3054e159746671babf93a12e7013
2019-09-12 01:43:16 +02:00
Pau Espin 35f0e664bf Split out GPRS SM layer into its own file
Change-Id: Ie61d22e7868af6de73cdf9c731f07130b282599d
2019-09-03 15:22:15 +02:00
Pau Espin 762c39ccc6 Move out sgsn to its own subdir
Change-Id: I16fccc0eadf588599b9e5578d0f4dbaf9df81737
2019-09-02 14:03:04 +02:00