open5gs/lib/sbi
Sukchan Lee a9b1b116b3 [SBI] Generate URI via HTTP.location as is (#3058)
A friend in the community was trying to connect an SMF made by another
manufacturer with an SBI interface and found a big problem with Open5GS.

All of the code in the part that generates the Resource URI
from HTTP.location is invalid.

For example, suppose we create a Resource URI with SMContext as below.
{apiRoot}/nsmf-pdusession/<apiVersion>/sm-contexts/{smContextRef}

In this case, Open5GS extracted the {smContextRef} part of the HTTP.location
and appended it to the beginning
{apiRoot}/nsmf-pdusession/<apiVersion>/sm-contexts/.

This implementation may not work properly if the apiRoot changes.
Consider a different port number as shown below.

<HTTP.location>
127.0.0.4:9999/nsmf-pdusession/v1/sm-contexts/1

The SMF may send an apiRoot to the AMF with a changed port number,
in which case the AMF must honor it.

Therefore, instead of extracting only the smContextRef from HTTP.location,
we modified it to use the whole thing to create a Resource URI.

We modified all NFs that use HTTP.location in the same way, not just SMFs.
2024-04-18 21:24:07 +09:00
..
contrib Add only one 5GC scenario (call-flow) 2020-06-17 01:22:28 -04:00
custom [SBI] Fixed openapitools MAP generation (#2103) 2023-02-26 10:01:08 +09:00
openapi [SBI] Ignore unknown enum values and continue parsing (#2622) (#2649) 2023-10-26 22:44:51 +09:00
support [SBI] Ignore unknown enum values and continue parsing (#2622) (#2649) 2023-10-26 22:44:51 +09:00
client.c [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
client.h [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
context.c [SBI] Generate URI via HTTP.location as is (#3058) 2024-04-18 21:24:07 +09:00
context.h [SBI] Generate URI via HTTP.location as is (#3058) 2024-04-18 21:24:07 +09:00
conv.c [SMF] Added Bi-Directional Flow (#2909) 2024-02-17 20:43:15 +01:00
conv.h [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
meson.build [SBI] Fixed openapitools MAP generation (#2103) 2023-02-26 10:01:08 +09:00
message.c UE context transfer (#3052) 2024-03-21 07:07:25 +09:00
message.h Include cause in HTTP response ProblemDetails (#3051) 2024-04-04 23:29:20 +09:00
mhd-server.c Include cause in HTTP response ProblemDetails (#3051) 2024-04-04 23:29:20 +09:00
nf-sm.c [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
nf-sm.h SCP(Model D) is now the default setting. 2022-10-22 11:26:04 +09:00
nghttp2-server.c Include cause in HTTP response ProblemDetails (#3051) 2024-04-04 23:29:20 +09:00
nnrf-build.c [SBI] Generate URI via HTTP.location as is (#3058) 2024-04-18 21:24:07 +09:00
nnrf-build.h [SBI] Added Handler for Subscription PATCH (#2152) 2023-03-12 22:06:19 +09:00
nnrf-handler.c [SBI] Generate URI via HTTP.location as is (#3058) 2024-04-18 21:24:07 +09:00
nnrf-handler.h [SBI] Added Handler for Subscription PATCH (#2152) 2023-03-12 22:06:19 +09:00
nnrf-path.c [SBI] Fixed invalid format of subscrCond (#2630) 2023-09-24 09:01:59 +09:00
nnrf-path.h [SBI] Added Handler for Subscription PATCH (#2152) 2023-03-12 22:06:19 +09:00
ogs-sbi.h UE context transfer (#3052) 2024-03-21 07:07:25 +09:00
path.c [SBI] Generate URI via HTTP.location as is (#3058) 2024-04-18 21:24:07 +09:00
path.h [SBI,NF] Don't treat SBI connection errors as asserts 2023-02-07 22:49:11 +09:00
server.c Include cause in HTTP response ProblemDetails (#3051) 2024-04-04 23:29:20 +09:00
server.h Include cause in HTTP response ProblemDetails (#3051) 2024-04-04 23:29:20 +09:00
timer.c [SBI] Added Handler for Subscription PATCH (#2152) 2023-03-12 22:06:19 +09:00
timer.h [SBI] Added Handler for Subscription PATCH (#2152) 2023-03-12 22:06:19 +09:00
types.c UPF HA - release/establish new PDU session in CM_IDLE (#2471) 2023-07-25 22:38:38 +09:00
types.h [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
yuarel.c Added NRF 2020-05-18 17:00:37 -04:00
yuarel.h Added NRF 2020-05-18 17:00:37 -04:00