open5gs/src/sgwc
Sukchan Lee 93110d011e [GTP-U] Fixed ogs_pfcp_find_gtpu_resource()(#2923)
As mentioned in the sgwu.yaml configuration file, it is possible to configure multiple addresses with different source_interface values for the gtpu interface.

Following the this section, I defined two addresses, one with source_interface set to 0 and another with source_interface set to 1. My expectation was to see different addresses for the two PDRs in the Session Establishment Response message during session establishment. However, both addresses were the same, and it was the address I had set for source_interface = 0.

When I looked into the code, I found the reason for the issue. In the lib/pfcp/context.c file, on line 1185, the function that determines the address is called as follows:

...
        } else {
            ogs_gtpu_resource_t *resource = NULL;
            resource = ogs_pfcp_find_gtpu_resource(
                    &ogs_gtp_self()->gtpu_resource_list,
                    pdr->dnn, OGS_PFCP_INTERFACE_ACCESS);
            if (resource) {
...
In the last parameter of this function, a constant value, OGS_PFCP_INTERFACE_ACCESS, is used. This causes every PDR with any source_interface to be considered as "access," and the value 0 is used for its interface.

I replaced the value with pdr->src_if, and the bug was resolved.
2024-01-30 22:39:34 +09:00
..
app.c A minor typo fix (#2707) 2023-10-28 22:11:58 +09:00
context.c [GTP-U] Fixed ogs_pfcp_find_gtpu_resource()(#2923) 2024-01-30 22:39:34 +09:00
context.h [GTP-U] Send Error Indication for unknown PDR 2023-04-16 12:30:36 +09:00
event.c Change Number of UEs usage [#533] 2020-08-25 23:05:01 -04:00
event.h SCP(Model D) is now the default setting. 2022-10-22 11:26:04 +09:00
gtp-path.c [GTP] gtp_message_fuzz: Abrt in ogs_abort 2023-08-24 22:19:42 +09:00
gtp-path.h X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
init.c [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
meson.build [NRF] Fixed library load error 2022-08-26 10:57:11 +09:00
pfcp-path.c [TLV] PFCP parser crash from FuzzingLabs (#2523) 2023-08-18 22:19:46 +09:00
pfcp-path.h [PFCP] Implement the Restoration Indication 2023-04-16 12:30:36 +09:00
pfcp-sm.c [SEPP] Initial Update for 5G Roaming (#2739) 2023-11-19 19:34:51 +09:00
s5c-handler.c [LOG] remove ogs_expect_or_return()/return_val() 2023-01-24 00:01:36 +09:00
s5c-handler.h Rename GTPv2C specifics to gtp2 prefix (#1485) 2022-04-13 07:07:39 +09:00
s11-build.c X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
s11-build.h X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
s11-handler.c [PFCP] Implement the Restoration Indication 2023-04-16 12:30:36 +09:00
s11-handler.h Rename GTPv2C specifics to gtp2 prefix (#1485) 2022-04-13 07:07:39 +09:00
sgwc-sm.c Fixed alpine stack overflow (#1911) 2022-11-27 00:03:56 +09:00
sgwc-sm.h Split SGW into SGW-C/SGW-U 2020-08-12 20:31:22 -04:00
sxa-build.c [PFCP] Support PFCP advertise address in F-SEID 2023-05-25 22:46:52 +09:00
sxa-build.h X2 handover with SGW change (#1367, #1459) 2022-05-12 22:52:36 +09:00
sxa-handler.c [GTP-U] Send Error Indication for unknown PDR 2023-04-16 12:30:36 +09:00
sxa-handler.h [ALL] Fix differences in function parameter names between definition and declaration 2022-07-01 21:38:47 +09:00
timer.c [SCP] Support of Indirect Communication 2022-07-16 13:27:18 +09:00
timer.h Split SGW into SGW-C/SGW-U 2020-08-12 20:31:22 -04:00