mirror of
https://github.com/open5gs/open5gs.git
synced 2025-11-02 13:03:31 +00:00
[ePDG] Add Node-Identifier IE support in GTPv2 S2b Create-Session-Request for SMF Diameter S6b Routing (#3507)
Implement support for Node-Identifier IE in GTPv2 S2b Create-Session-Request to SMF for Diameter S6b integration This patch adds support for processing the Node-Identifier IE within GTPv2 Create-Session-Request messages sent via the S2b interface to the SMF. When the ePDG includes the Node-Identifier IE containing both host and realm of the AAA-Server, the SMF now uses this information to populate the Destination-Realm and Destination-Host AVPs in the Diameter S6b AAR message. This enables seamless integration and allows the SMF to route requests directly to the appropriate AAA-Server, enhancing interoperability in setups where the host and realm data are required by the Diameter network.
This commit is contained in:
@@ -46,6 +46,9 @@ ogs_pkbuf_t *test_s2b_build_create_session_request(
|
||||
|
||||
ogs_gtp2_indication_t indication;
|
||||
|
||||
char node_identifier_buf[OGS_GTP2_MAX_NODE_IDENTIFIER_LEN];
|
||||
ogs_gtp2_node_identifier_t node_identifier;
|
||||
|
||||
ogs_assert(sess);
|
||||
test_ue = sess->test_ue;
|
||||
ogs_assert(test_ue);
|
||||
@@ -172,6 +175,16 @@ ogs_pkbuf_t *test_s2b_build_create_session_request(
|
||||
(uint8_t *)"\x80\x00\x0d\x00";
|
||||
req->additional_protocol_configuration_options.len = 4;
|
||||
|
||||
memset(&node_identifier, 0, sizeof(ogs_gtp2_node_identifier_t));
|
||||
node_identifier.name = "aaa.localdomain";
|
||||
node_identifier.name_len = strlen(node_identifier.name);
|
||||
node_identifier.realm = "localdomain";
|
||||
node_identifier.realm_len = strlen(node_identifier.realm);
|
||||
req->_aaa_server_identifier.presence = 1;
|
||||
ogs_gtp2_build_node_identifier(
|
||||
&req->_aaa_server_identifier, &node_identifier,
|
||||
node_identifier_buf, OGS_GTP2_MAX_NODE_IDENTIFIER_LEN);
|
||||
|
||||
gtp_message.h.type = type;
|
||||
return ogs_gtp2_build_msg(>p_message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user