Pau Espin
7bf413c2a0
WIP: trigger encode error
...
Run in erlang shell:
ip link del gtp0; rebar3 shell --config ./config/local.config
Then do:
eunit:test(aaa_diameter_s6b,[verbose]).
Change-Id: I9f83ec2c4b8e09d2e01000bfa695c41129021cb7
2024-03-13 21:21:04 +01:00
Pau Espin
ff57ae27ff
Implement RTR Deregistration-Reason PERMANENT_TERMINATION
...
Change-Id: I57f2e02dc4034b63c118e4a4139b2830e38a2138
2024-03-13 20:21:59 +01:00
Pau Espin
56fd123844
gsup_server: Fix format error in log line
...
Change-Id: I4c724a65e49fc8bcaad7598fc07f3ddcbc9fa35f
2024-03-13 17:47:50 +01:00
Pau Espin
c5ba31465d
epdg_ue_fsm: Fix order of params in stop_and_reply
...
Change-Id: Icd058466463d215f4028d302cd45041e5627b459
2024-03-13 17:11:33 +01:00
Pau Espin
57e2eb47a9
aaa_diameter_s6b.erl: Get rid of unused code
...
Change-Id: I9e94fe26073ddb1740c3ae1d761d359c3f1b7439
2024-03-11 19:59:33 +01:00
Pau Espin
bc53ecd5ad
AAA: Swx: Answer RTR with RTA
...
Related: OS#6042
Change-Id: Iba49fe8565d2303f975003ed2a79de25a4b23832
2024-03-11 16:58:17 +01:00
Pau Espin
74fff9f574
aaa_diameter_swm: Look up aaa_ue_fsm process each time it needs to be accessed
...
Similar to what was already done in
745d542b92
fpr epdg_ue_fsm.
Change-Id: Ic019d41716284639f6256f7ba24533bf806333b1
2024-03-11 16:38:57 +01:00
Pau Espin
a0dcef110c
Implement sim auth resync
...
Related: OS#6345
Change-Id: I75413b0c4b491425c3b01d75fdd1674cf7f3bbde
2024-03-11 11:06:31 +01:00
Pau Espin
8ecd6e5618
gsup_server: Spawn one process per rx message
...
This way if rx path crashes it won't affect the gsup_server socket,
which will just discard the received packet.
Change-Id: Ifb5ece08007be59657d0d2f428e9d991af696026
2024-03-07 14:14:12 +01:00
Pau Espin
745d542b92
gsup_server: Look up epdg_ue_fsm process each time it needs to be accessed
...
This allows simplifying a lot gsup_server state, make it far less prone
to bugs due to state ending up in an unconsistent state.
Nowadays the state is held in the epdg_ue_fsm.
It also allows easily spawning a process per rx msg, since no
start_monitor() is required (monitor would need to be passed to parent
gen_server process then from the per message spawned process).
Change-Id: I80203a7cf0efe82eec3773ee773d25310c07a2c3
2024-03-07 14:10:17 +01:00
Pau Espin
8018716514
gsup_server: Move rx_gsup path to its own function
...
This is a preparation step to later on spawn one process per rx msg.
Change-Id: Ie551ed14f7ab8c447f25981a6a1d6ed4ddb470b7
2024-03-07 14:06:16 +01:00
Pau Espin
98d233950e
Move spawn_wait_ret() to a new misc.erl file
...
It may be reused by other modules spawning process per message, like
gsup_server.erl.
Change-Id: I9777b73942e9dc672dd944a82045710b78893974
2024-03-07 13:25:35 +01:00
Pau Espin
ae6e7d4521
Migrate S6b to use new epdg_dia_rc record
...
Change-Id: I11674ef7b9fb541d7e48a74fa986ee0798042de9
2024-03-06 19:18:08 +01:00
Pau Espin
d1b03fdde4
aaa_ue_fsm: Fix format error during log
...
Change-Id: Id57156dfb5de0cddf6fb42def5c312c85dff09f8
2024-03-06 19:13:50 +01:00
Pau Espin
f5ebb7d1e5
Forward failure SWx MAA -> GSUP AuthInfo Error
...
Change-Id: I48066058e601a4ca4d46e239f7a7060bbc20a32b
2024-03-06 18:36:38 +01:00
Pau Espin
85061599dc
epdg_ue_fsm: Allow UE restarting authentication
...
Related: OS#6391
Change-Id: I33387deafaaa14fa21921fc5523f88db93283609
2024-03-06 16:42:11 +01:00
Pau Espin
3aaee678e9
gsups_server: Monitor epdg_ue_fsm instead of linking it
...
We want to be notified about the FSM going down, instead of having the
supervisor restart it (and potentially restarting the whole set of
children with it...).
Change-Id: I96284aa8752d317cfb5f5c4565d7dea09e56171f
2024-03-06 16:37:17 +01:00
Pau Espin
6107d8f549
Avoid propagating full diameter Swx MAA message to epdg gsup module
...
Keep diameter specific stuff in the diameter module.
Change-Id: I4a787649cf970fc08e32cfb27e846598515482ef
2024-03-05 19:36:09 +01:00
Pau Espin
1fdcf20998
Forward PGW Address PGW->AAA->HSS
...
We were missing passing the actual IP address of the PDN-GW when
transmitting SAR to the HSS (precisely with the aim of updating that
information).
Change-Id: Ia99442487fef56c16c4be2fb7f36221d016e55e0
2024-03-05 17:47:11 +01:00
Pau Espin
876ae0e425
Forward PGW Address HSS->AAA->ePDG
...
Use subscriber information provided by AAA & HSS regarding PDN-GW
address when creating the S2b session.
Related: OS#6384
Change-Id: I83a68271ee6548e0e32fc9f0cab385bad5852388
2024-03-04 19:15:43 +01:00
Pau Espin
d8b0d7d17f
epdg_ue_fsm.erl: Log unexpected event
...
Change-Id: If5a9298296df07555e79fd61e1f7b948b9a1dd15
2024-02-28 20:51:41 +01:00
Pau Espin
0eada458a9
aaa_diameter_swx: Make tx timeout configurable and increase default to 10 seconds
...
Change-Id: I52c993b92da9979761b0c1526b5f253dff9d2e2f
2024-02-28 20:44:27 +01:00
Pau Espin
380beb7430
aaa_diameter_swx_cb.erl: Fix undef handle_error/5
...
We are passing extra parameters, so this function also needs to be
adapted to the extra parameter, like handle_answer.
Change-Id: Id66b849f62a98c4ae69ccd4106bc04b51712c589
2024-02-28 20:35:20 +01:00
Pau Espin
60cbb8c67c
epdg_ue_fsm: Increase timeout waiting for gtp response
...
Answers can take a while specially during CreateSession, where several
nodes are involved, like PGW, AAA, HSS, PCRF, etc.
Change-Id: I3c8e7c7551bb3d48c46c0195c02cb44ce222a17f
2024-02-28 20:35:20 +01:00
Pau Espin
da6412ac22
s2b: Handle CreateSession with failed Cause
...
Related: OS#6371
Change-Id: I7bc840e863c0a1eff3b1df2c42f6b1868dec8dae
2024-02-28 20:35:16 +01:00
Pau Espin
50815ba9d1
s2b: Spawn process for each received packet
...
Change-Id: I460b382aedbc10b06d846131b4cd838e30668df4
2024-02-28 18:49:22 +01:00
Pau Espin
e82c9cb353
Forward PCO from GSUP ePDG Tunnel Req to SMF CreateSessionRequest
...
A patch in gtplib was submitted to make it possible to encode/decode PCO
payload.
Related: OS#6369
Change-Id: I51fba731e77c77a95b9310820ec7116f0e5abf8b
2024-02-22 20:24:56 +01:00
Pau Espin
2a6c24f56f
s2b: Reorder some CreateSessionReq according to spec
...
Change-Id: I5f9d4de12038cc3627bf6341ae1cf4d3655a5251
2024-02-22 16:12:03 +00:00
Pau Espin
2063a31a9b
gsup_server: Log rx of all GSUP messages
...
Change-Id: I348e20f65e8bdb713819256615a84292ed4e9833
2024-02-22 16:12:03 +00:00
Pau Espin
47d5dec923
Send correct APN in GSUP CEAI Tunnel Response
...
Change-Id: Ifbd78720436690e9ee40688e455ab61d65085738
2024-02-14 19:14:47 +01:00
Pau Espin
e8603b5ea5
s2b: Announce proper GTPU Local Address during CreateSessionReq
...
Change-Id: I43ad4f9e59cb80e0016d9163364d9f202d0d0fb3
2024-02-13 19:31:05 +01:00
Pau Espin
b8e9407e07
Delete PDP Context when moving out of active state
...
Change-Id: I95602da4d5441ee97daad9213e84f3d9671efa09
2024-02-12 19:18:32 +01:00
Pau Espin
461f1fa661
epdg_ue_fsm: Add new state 'active'
...
This state is reached after the pdp context is properly set up at the
tun device.
Change-Id: Idc651cc19ae8c22c73e40dfc04130854082e2de5
2024-02-12 19:18:32 +01:00
Pau Espin
6f640143a4
gtp_u_tun: Fix call to gtp_u_kmod create_pdp_context
...
Change-Id: Ie3837cdcfabbfe3c21af42940a7c41a8b87cc799
2024-02-12 18:20:32 +01:00
Pau Espin
737b86d90d
epdg_ue_fsm: Move s2b CreateSession to its own state
...
Change-Id: Ifb29baeac8b4ea056ca0c3d2435305894954eaa6
2024-02-12 17:26:53 +01:00
Pau Espin
3e2ecc134a
epdg_ue_fsm: Allow re-auth procedure
...
Change-Id: Ifa98b88aadc23a7dab70e7e0a3f6e01c35353333
2024-02-12 17:26:53 +01:00
Pau Espin
dc13e5088d
s2b: Take unused local TEIC/TEID when new one is needed
...
Change-Id: I7262402d14fc53ff17c4000cef385136b8de7e55
2024-02-12 15:57:32 +01:00
Pau Espin
23474336c8
s2b: Increment gtp SeqNo after transmitting message
...
Change-Id: Ia65ef7380f01d080ca05393887661d4af698646a
2024-02-12 15:57:32 +01:00
Pau Espin
a4b154699f
s2b: Use provided APN in CreateSessionReq
...
Change-Id: I9e48c531aec837aade44a8c87d61a67f6bb44ca9
2024-02-12 15:57:32 +01:00
Pau Espin
9ff8c9e9bf
cosmetic: s2b: Drop done TODO comment
...
Change-Id: Idf99168dccc7373ffc75e5871f2ea9516b9854c5
2024-02-12 15:57:32 +01:00
Pau Espin
d694ee9040
Create pdp context in the tundev
...
Use gtp_u_kmod call to create a pdp context in the gtp interface.
Change-Id: I4e0b3fe0e3e156c9a20df0ab8cdfc447fd9bb1eb
2024-02-12 15:57:32 +01:00
Pau Espin
10b719de3b
Use gtp_u_kmod to create a gtp tundev
...
Adding gtp_u_kmod app in osmo_epdg.app.src makes the module app started
and create gtp tunnel based on config file upon startup.
No other operation is done yet on the tunnel, but this step already
allows testing by manually creating pdp contexts outside of the app.
The module gtp_u_kmod currently creates the tundev interface with name
"gtp0" (hardcoded).
The module gtp_u_kmod will fail if the gtp tundev is already created, so
be sure to have it removed before starting osmo-epdg.
Change-Id: Ie7718e1b161477bd738fa75f803ab37e9f35121d
2024-02-12 15:57:32 +01:00
Pau Espin
459ab2e044
s2b: Fix FTEID interface in CreateSessionResponse
...
Change-Id: Iac76804738cdf237024bd762d5ea3aaf9a2cb9c1
2024-02-09 18:50:38 +01:00
Pau Espin
36521c27f2
Expect NAI instead of Imsi in S6b AAR
...
Change-Id: I6599b84c2a0e1a758cb63bb9e419fa4c3cf4f4a6
2024-02-09 18:50:10 +01:00
Pau Espin
d772ad79df
gsup_server: Allow receiveing AuthInfo without PdpInfo
...
Change-Id: Ife5293fd5942875c13bf29a462496bd8ea9212b7
2024-02-09 17:16:22 +01:00
Pau Espin
50f17900a1
Create PDP Context in tunnel after rx S6b CreateSessionResp
...
This refactoring is a preparation to call the gtp_u_kmod APIs.
Change-Id: I911985743af6b3fa90fd78631a562b85ecacce15
2024-02-08 19:20:09 +00:00
Pau Espin
4802aaca86
Keep gtp2c specificities in its module file
...
Change-Id: I03cfe86723e881013a3a745eb81f6d0d8b9cfe94
2024-02-08 19:20:09 +00:00
Pau Espin
db3ba017e7
Add defines for PDP Address Type Nr
...
The values are the same for GTP and GMM (which in turn are used by
GSUP).
Change-Id: I48e7064f598d6dfb0d4398500fb078b2d5da0226
2024-02-08 19:20:09 +00:00
Pau Espin
ed89689d49
Make PDP-Type and APN from GSUP AuthInfoReq available through all layers
...
Change-Id: I3f29b00f57f433f8623b9f0a5048c83985e5cced
2024-02-08 19:20:09 +00:00
Alexander Couzens
2ebc823274
GTPv2/S2b: use correct instance id in the F-TEID
...
I've no idea why, but it seems the GTPu is the EBI, but the GTP-C is always 0.
This way it works with open5gs.
Change-Id: I053fe5661a38ce6fa7995964a0346129b56c823e
2024-02-08 19:05:59 +00:00