Commit Graph

156 Commits

Author SHA1 Message Date
Pau Espin 859807eb7f rebar.config: Update required OTP version 25.2.3
Since anyway we need debian12 for other reasons, like newer kernel, then
also require OTP from debian12 which is the one being tested and we want
to support. At the moment, debian12 OTP package version is 25.2.3.
I am personally building with Archlinux's package version 26.2.2.

Change-Id: I0ac7c93adbe88e1b738f1319cf1280c119ed59d1
2024-03-13 20:20:39 +01:00
Pau Espin 0d09d1e568 jenkins.sh: use available Makefile, clean before building
The project needs to go through clean procedure to clean up the
generated diameter files, so that they are generated from newer dia
files again.

Change-Id: Id3f2d71c184cf387fa178d5138d401686a8d0a63
2024-03-13 20:12:55 +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 25965225c4 diameter_3gpp_ts29_229.dia: Fix enum Reason-Code not defined
Change-Id: I39055e699cfba7b5af70890a22089f7992b2422f
2024-03-11 13:51:18 +01:00
Pau Espin 726a08ed77 cosmetic: diameter_3gpp_ts29_229.dia: Fix trailing whitespace
Change-Id: I2a31d333ce0a412e2bc02038dd72107ab39300ce
2024-03-11 13:51:11 +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 cf97f8b418 diameter_3gpp_ts29_273_swx.dia: Fix missing dependency RFC4004
TS 29.273 SAR contains MIP6-Agent-Info from RFC5447, which in turn
contains MIP-Home-Agent-Address from RFC 4004.

Related: ffe4e0b084
Related: OS#6045
Change-Id: Ifaea9ffaec1f50b5ec996a03f3addd70ccd2349f
2024-03-05 17:47:04 +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 2a9e926248 Update osmo_ss7 to gerrit remote with latest patches
* Change the remote to gerrit, since it's the main repo (gitea is a
  read-only mirror). This allows easily pushing branches for development
  in gerrit.
* Update the references to point to the latest commits containing
  several improvements and fixes needed for osmo-epdg.

Related: OS#6377
Change-Id: Id16fb7d319f6b6eb5c1eeb2ae6c7d22a7f7e1641
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 4085ff2a65 Use osmocom gtplib pointing to newer version of code
Change-Id: Iaf2e195aaeac6d1b157a4b0dd6cd3d80deaa1308
2024-02-22 20:24:04 +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
Harald Welte 2e664b44c9 README.md: Major update with the usual information
Let's convert the README.md to actual markdown syntax and add the usual
information such as project homepage, git repository, etc.

Change-Id: I0e1d69e297095f59d27eb176db4b58f4d13361bc
2024-02-22 10:38:39 +01:00
Pau Espin c71b27a36d debian: Fixes in systemd service
Update the osmo-epdg.service file to point to proper directories.

Patch installed config file so that the libdir points to the dir where
libraries were installed.

Change-Id: Icd640d517b33a840d73aaabef9c594541848357a
2024-02-21 15:36:20 +01:00
Pau Espin 62ace3c7c3 rebar.lock: Update after dependency fixes/updates
This contains 32bit compilation fixes for gen_socket and support to set
tundev iface name in gtp_u_kmod.

Change-Id: Iea501aca2a15df48aaae2672dcb9d39716ea585c
2024-02-21 15:36:13 +01: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 b41945b9e4 config: Do not set up VRF
gtp_u_kmod won't configure the VRF if the node is not present.
We don't want to use it for now, so disable it.

Change-Id: Ia47a85e2d51e56368cc9940ef0e6faa41afe81e9
2024-02-13 12:06: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