forked from acouzens/open5gs
[SBI] Remove one octet length in FQDN (#1333)
This commit is contained in:
parent
866ae78f5e
commit
3b275edec7
|
@ -542,6 +542,9 @@ void ogs_sbi_nf_instance_clear(ogs_sbi_nf_instance_t *nf_instance)
|
||||||
|
|
||||||
ogs_assert(nf_instance);
|
ogs_assert(nf_instance);
|
||||||
|
|
||||||
|
if (nf_instance->fqdn)
|
||||||
|
ogs_free(nf_instance->fqdn);
|
||||||
|
|
||||||
for (i = 0; i < nf_instance->num_of_ipv4; i++) {
|
for (i = 0; i < nf_instance->num_of_ipv4; i++) {
|
||||||
if (nf_instance->ipv4[i])
|
if (nf_instance->ipv4[i])
|
||||||
ogs_freeaddrinfo(nf_instance->ipv4[i]);
|
ogs_freeaddrinfo(nf_instance->ipv4[i]);
|
||||||
|
@ -698,6 +701,9 @@ void ogs_sbi_nf_service_clear(ogs_sbi_nf_service_t *nf_service)
|
||||||
nf_instance = nf_service->nf_instance;
|
nf_instance = nf_service->nf_instance;
|
||||||
ogs_assert(nf_instance);
|
ogs_assert(nf_instance);
|
||||||
|
|
||||||
|
if (nf_service->fqdn)
|
||||||
|
ogs_free(nf_service->fqdn);
|
||||||
|
|
||||||
for (i = 0; i < nf_service->num_of_version; i++) {
|
for (i = 0; i < nf_service->num_of_version; i++) {
|
||||||
if (nf_service->versions[i].in_uri)
|
if (nf_service->versions[i].in_uri)
|
||||||
ogs_free(nf_service->versions[i].in_uri);
|
ogs_free(nf_service->versions[i].in_uri);
|
||||||
|
@ -897,8 +903,10 @@ void ogs_sbi_nf_instance_build_default(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hostname)
|
if (hostname) {
|
||||||
strcpy(nf_instance->fqdn, hostname);
|
nf_instance->fqdn = ogs_strdup(hostname);
|
||||||
|
ogs_assert(nf_instance->fqdn);
|
||||||
|
}
|
||||||
|
|
||||||
nf_instance->time.heartbeat_interval =
|
nf_instance->time.heartbeat_interval =
|
||||||
ogs_app()->time.nf_instance.heartbeat_interval;
|
ogs_app()->time.nf_instance.heartbeat_interval;
|
||||||
|
@ -970,8 +978,10 @@ ogs_sbi_nf_service_t *ogs_sbi_nf_service_build_default(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hostname)
|
if (hostname) {
|
||||||
strcpy(nf_service->fqdn, hostname);
|
nf_service->fqdn = ogs_strdup(hostname);
|
||||||
|
ogs_assert(nf_service->fqdn);
|
||||||
|
}
|
||||||
|
|
||||||
return nf_service;
|
return nf_service;
|
||||||
}
|
}
|
||||||
|
@ -1006,7 +1016,7 @@ static ogs_sbi_client_t *nf_instance_find_client(
|
||||||
ogs_sbi_client_t *client = NULL;
|
ogs_sbi_client_t *client = NULL;
|
||||||
ogs_sockaddr_t *addr = NULL;
|
ogs_sockaddr_t *addr = NULL;
|
||||||
|
|
||||||
if (strlen(nf_instance->fqdn))
|
if (nf_instance->fqdn)
|
||||||
client = find_client_by_fqdn(nf_instance->fqdn, 0);
|
client = find_client_by_fqdn(nf_instance->fqdn, 0);
|
||||||
|
|
||||||
if (!client) {
|
if (!client) {
|
||||||
|
@ -1031,7 +1041,7 @@ static void nf_service_associate_client(ogs_sbi_nf_service_t *nf_service)
|
||||||
ogs_sbi_client_t *client = NULL;
|
ogs_sbi_client_t *client = NULL;
|
||||||
ogs_sockaddr_t *addr = NULL;
|
ogs_sockaddr_t *addr = NULL;
|
||||||
|
|
||||||
if (strlen(nf_service->fqdn))
|
if (nf_service->fqdn)
|
||||||
client = find_client_by_fqdn(nf_service->fqdn, 0);
|
client = find_client_by_fqdn(nf_service->fqdn, 0);
|
||||||
|
|
||||||
if (!client) {
|
if (!client) {
|
||||||
|
|
|
@ -86,7 +86,7 @@ typedef struct ogs_sbi_nf_instance_s {
|
||||||
OpenAPI_nf_type_e nf_type;
|
OpenAPI_nf_type_e nf_type;
|
||||||
OpenAPI_nf_status_e nf_status;
|
OpenAPI_nf_status_e nf_status;
|
||||||
|
|
||||||
char fqdn[OGS_MAX_FQDN_LEN];
|
char *fqdn;
|
||||||
|
|
||||||
#define OGS_SBI_MAX_NUM_OF_IP_ADDRESS 8
|
#define OGS_SBI_MAX_NUM_OF_IP_ADDRESS 8
|
||||||
int num_of_ipv4;
|
int num_of_ipv4;
|
||||||
|
@ -173,7 +173,7 @@ typedef struct ogs_sbi_nf_service_s {
|
||||||
char *expiry;
|
char *expiry;
|
||||||
} versions[OGS_SBI_MAX_NUM_OF_SERVICE_VERSION];
|
} versions[OGS_SBI_MAX_NUM_OF_SERVICE_VERSION];
|
||||||
|
|
||||||
char fqdn[OGS_MAX_FQDN_LEN];
|
char *fqdn;
|
||||||
int num_of_addr;
|
int num_of_addr;
|
||||||
struct {
|
struct {
|
||||||
ogs_sockaddr_t *ipv4;
|
ogs_sockaddr_t *ipv4;
|
||||||
|
|
|
@ -32,8 +32,10 @@ OpenAPI_nf_profile_t *ogs_nnrf_nfm_build_nf_profile(
|
||||||
OpenAPI_list_t *NFServiceList = NULL;
|
OpenAPI_list_t *NFServiceList = NULL;
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
int fqdn_len;
|
int fqdn_len;
|
||||||
char fqdn[OGS_MAX_FQDN_LEN];
|
char fqdn[OGS_MAX_FQDN_LEN];
|
||||||
|
#endif
|
||||||
|
|
||||||
char *ipstr = NULL;
|
char *ipstr = NULL;
|
||||||
|
|
||||||
|
@ -60,7 +62,8 @@ OpenAPI_nf_profile_t *ogs_nnrf_nfm_build_nf_profile(
|
||||||
NFProfile->is_nf_profile_changes_support_ind = true;
|
NFProfile->is_nf_profile_changes_support_ind = true;
|
||||||
NFProfile->nf_profile_changes_support_ind = true;
|
NFProfile->nf_profile_changes_support_ind = true;
|
||||||
|
|
||||||
if (strlen(nf_instance->fqdn)) {
|
if (nf_instance->fqdn) {
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
memset(fqdn, 0, sizeof(fqdn));
|
memset(fqdn, 0, sizeof(fqdn));
|
||||||
fqdn_len = ogs_fqdn_build(fqdn,
|
fqdn_len = ogs_fqdn_build(fqdn,
|
||||||
nf_instance->fqdn, strlen(nf_instance->fqdn));
|
nf_instance->fqdn, strlen(nf_instance->fqdn));
|
||||||
|
@ -71,6 +74,9 @@ OpenAPI_nf_profile_t *ogs_nnrf_nfm_build_nf_profile(
|
||||||
ogs_debug("NFInstance-FQDN[%s]", nf_instance->fqdn);
|
ogs_debug("NFInstance-FQDN[%s]", nf_instance->fqdn);
|
||||||
ogs_log_hexdump(OGS_LOG_DEBUG,
|
ogs_log_hexdump(OGS_LOG_DEBUG,
|
||||||
(unsigned char *)NFProfile->fqdn, fqdn_len);
|
(unsigned char *)NFProfile->fqdn, fqdn_len);
|
||||||
|
#else
|
||||||
|
NFProfile->fqdn = ogs_strdup(nf_instance->fqdn);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
NFProfile->is_priority = true;
|
NFProfile->is_priority = true;
|
||||||
|
@ -183,7 +189,8 @@ OpenAPI_nf_profile_t *ogs_nnrf_nfm_build_nf_profile(
|
||||||
NFService->scheme = nf_service->scheme;
|
NFService->scheme = nf_service->scheme;
|
||||||
NFService->nf_service_status = nf_service->status;
|
NFService->nf_service_status = nf_service->status;
|
||||||
|
|
||||||
if (strlen(nf_service->fqdn)) {
|
if (nf_service->fqdn) {
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
memset(fqdn, 0, sizeof(fqdn));
|
memset(fqdn, 0, sizeof(fqdn));
|
||||||
fqdn_len = ogs_fqdn_build(fqdn,
|
fqdn_len = ogs_fqdn_build(fqdn,
|
||||||
nf_service->fqdn, strlen(nf_service->fqdn));
|
nf_service->fqdn, strlen(nf_service->fqdn));
|
||||||
|
@ -194,6 +201,9 @@ OpenAPI_nf_profile_t *ogs_nnrf_nfm_build_nf_profile(
|
||||||
ogs_debug("NFService-FQDN[%s]", nf_service->fqdn);
|
ogs_debug("NFService-FQDN[%s]", nf_service->fqdn);
|
||||||
ogs_log_hexdump(OGS_LOG_DEBUG,
|
ogs_log_hexdump(OGS_LOG_DEBUG,
|
||||||
(unsigned char *)NFService->fqdn, fqdn_len);
|
(unsigned char *)NFService->fqdn, fqdn_len);
|
||||||
|
#else
|
||||||
|
NFService->fqdn = ogs_strdup(nf_service->fqdn);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
IpEndPointList = OpenAPI_list_create();
|
IpEndPointList = OpenAPI_list_create();
|
||||||
|
|
|
@ -161,6 +161,9 @@ bool ogs_sbi_nnrf_handle_nf_profile(ogs_sbi_nf_instance_t *nf_instance,
|
||||||
|
|
||||||
OpenAPI_lnode_t *node;
|
OpenAPI_lnode_t *node;
|
||||||
ogs_sbi_nf_service_t *nf_service = NULL, *next_nf_service = NULL;
|
ogs_sbi_nf_service_t *nf_service = NULL, *next_nf_service = NULL;
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
|
char fqdn[OGS_MAX_FQDN_LEN+1];
|
||||||
|
#endif
|
||||||
|
|
||||||
ogs_assert(nf_instance);
|
ogs_assert(nf_instance);
|
||||||
ogs_assert(NFProfile);
|
ogs_assert(NFProfile);
|
||||||
|
@ -248,14 +251,22 @@ bool ogs_sbi_nnrf_handle_nf_profile(ogs_sbi_nf_instance_t *nf_instance,
|
||||||
nf_instance->time.heartbeat_interval = NFProfile->heart_beat_timer;
|
nf_instance->time.heartbeat_interval = NFProfile->heart_beat_timer;
|
||||||
|
|
||||||
if (NFProfile->fqdn) {
|
if (NFProfile->fqdn) {
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
if (ogs_fqdn_parse(
|
if (ogs_fqdn_parse(
|
||||||
nf_instance->fqdn, NFProfile->fqdn,
|
fqdn, NFProfile->fqdn,
|
||||||
ogs_min(strlen(NFProfile->fqdn), OGS_MAX_FQDN_LEN)) > 0) {
|
ogs_min(strlen(NFProfile->fqdn), OGS_MAX_FQDN_LEN)) > 0) {
|
||||||
|
|
||||||
/* Nothing : succeeded to parse FQDN */
|
/* Nothing : succeeded to parse FQDN */
|
||||||
|
nf_instance->fqdn = ogs_strdup(fqdn);
|
||||||
|
ogs_assert(nf_instance);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ogs_error("ogs_fqdn_parse() failed[%s]", NFProfile->fqdn);
|
ogs_error("ogs_fqdn_parse() failed[%s]", NFProfile->fqdn);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
nf_instance->fqdn = ogs_strdup(NFProfile->fqdn);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NFProfile->is_priority == true)
|
if (NFProfile->is_priority == true)
|
||||||
|
@ -335,14 +346,23 @@ bool ogs_sbi_nnrf_handle_nf_profile(ogs_sbi_nf_instance_t *nf_instance,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (NFService->fqdn) {
|
if (NFService->fqdn) {
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
if (ogs_fqdn_parse(
|
if (ogs_fqdn_parse(
|
||||||
nf_service->fqdn, NFService->fqdn,
|
fqdn, NFService->fqdn,
|
||||||
ogs_min(strlen(NFService->fqdn), OGS_MAX_FQDN_LEN)) > 0) {
|
ogs_min(strlen(NFService->fqdn), OGS_MAX_FQDN_LEN)) > 0) {
|
||||||
|
|
||||||
/* Nothing : succeeded to parse FQDN */
|
/* Nothing : succeeded to parse FQDN */
|
||||||
|
nf_service->fqdn = ogs_strdup(fqdn);
|
||||||
|
ogs_assert(nf_service);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
ogs_error("ogs_fqdn_parse() failed[%s]", NFService->fqdn);
|
ogs_error("ogs_fqdn_parse() failed[%s]", NFService->fqdn);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
nf_service->fqdn = ogs_strdup(NFService->fqdn);
|
||||||
|
ogs_assert(nf_service);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
OpenAPI_list_for_each(IpEndPointList, node2) {
|
OpenAPI_list_for_each(IpEndPointList, node2) {
|
||||||
|
|
|
@ -34,8 +34,10 @@ bool bsf_nbsf_management_handle_pcf_binding(
|
||||||
OpenAPI_pcf_binding_t *RecvPcfBinding = NULL;
|
OpenAPI_pcf_binding_t *RecvPcfBinding = NULL;
|
||||||
OpenAPI_pcf_binding_t SendPcfBinding;
|
OpenAPI_pcf_binding_t SendPcfBinding;
|
||||||
OpenAPI_snssai_t Snssai;
|
OpenAPI_snssai_t Snssai;
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
char fqdn[OGS_MAX_FQDN_LEN+1];
|
char fqdn[OGS_MAX_FQDN_LEN+1];
|
||||||
int fqdn_len;
|
int fqdn_len;
|
||||||
|
#endif
|
||||||
|
|
||||||
ogs_assert(stream);
|
ogs_assert(stream);
|
||||||
ogs_assert(recvmsg);
|
ogs_assert(recvmsg);
|
||||||
|
@ -101,6 +103,7 @@ bool bsf_nbsf_management_handle_pcf_binding(
|
||||||
bsf_sess_set_ipv6prefix(sess, RecvPcfBinding->ipv6_prefix);
|
bsf_sess_set_ipv6prefix(sess, RecvPcfBinding->ipv6_prefix);
|
||||||
|
|
||||||
if (RecvPcfBinding->pcf_fqdn) {
|
if (RecvPcfBinding->pcf_fqdn) {
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
ogs_assert(0 < ogs_fqdn_parse(
|
ogs_assert(0 < ogs_fqdn_parse(
|
||||||
fqdn, RecvPcfBinding->pcf_fqdn,
|
fqdn, RecvPcfBinding->pcf_fqdn,
|
||||||
ogs_min(strlen(RecvPcfBinding->pcf_fqdn),
|
ogs_min(strlen(RecvPcfBinding->pcf_fqdn),
|
||||||
|
@ -110,6 +113,12 @@ bool bsf_nbsf_management_handle_pcf_binding(
|
||||||
ogs_free(sess->pcf_fqdn);
|
ogs_free(sess->pcf_fqdn);
|
||||||
sess->pcf_fqdn = ogs_strdup(fqdn);
|
sess->pcf_fqdn = ogs_strdup(fqdn);
|
||||||
ogs_assert(sess->pcf_fqdn);
|
ogs_assert(sess->pcf_fqdn);
|
||||||
|
#else
|
||||||
|
if (sess->pcf_fqdn)
|
||||||
|
ogs_free(sess->pcf_fqdn);
|
||||||
|
sess->pcf_fqdn = ogs_strdup(RecvPcfBinding->pcf_fqdn);
|
||||||
|
ogs_assert(sess->pcf_fqdn);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PcfIpEndPointList = RecvPcfBinding->pcf_ip_end_points;
|
PcfIpEndPointList = RecvPcfBinding->pcf_ip_end_points;
|
||||||
|
@ -224,12 +233,16 @@ bool bsf_nbsf_management_handle_pcf_binding(
|
||||||
ogs_assert(PcfIpEndPointList);
|
ogs_assert(PcfIpEndPointList);
|
||||||
|
|
||||||
if (sess->pcf_fqdn && strlen(sess->pcf_fqdn)) {
|
if (sess->pcf_fqdn && strlen(sess->pcf_fqdn)) {
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
memset(fqdn, 0, sizeof(fqdn));
|
memset(fqdn, 0, sizeof(fqdn));
|
||||||
fqdn_len = ogs_fqdn_build(fqdn,
|
fqdn_len = ogs_fqdn_build(fqdn,
|
||||||
sess->pcf_fqdn, strlen(sess->pcf_fqdn));
|
sess->pcf_fqdn, strlen(sess->pcf_fqdn));
|
||||||
SendPcfBinding.pcf_fqdn = ogs_memdup(fqdn, fqdn_len+1);
|
SendPcfBinding.pcf_fqdn = ogs_memdup(fqdn, fqdn_len+1);
|
||||||
ogs_assert(SendPcfBinding.pcf_fqdn);
|
ogs_assert(SendPcfBinding.pcf_fqdn);
|
||||||
SendPcfBinding.pcf_fqdn[fqdn_len] = 0;
|
SendPcfBinding.pcf_fqdn[fqdn_len] = 0;
|
||||||
|
#else
|
||||||
|
SendPcfBinding.pcf_fqdn = ogs_strdup(sess->pcf_fqdn);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < sess->num_of_pcf_ip; i++) {
|
for (i = 0; i < sess->num_of_pcf_ip; i++) {
|
||||||
|
|
10
src/main.c
10
src/main.c
|
@ -64,6 +64,16 @@ static int check_signal(int signum)
|
||||||
signum, ogs_signal_description_get(signum));
|
signum, ogs_signal_description_get(signum));
|
||||||
break;
|
break;
|
||||||
case SIGUSR1:
|
case SIGUSR1:
|
||||||
|
fprintf(stderr,
|
||||||
|
"%*s%-30s contains %6lu bytes in %3lu blocks (ref %d) %p\n",
|
||||||
|
0, "", "core",
|
||||||
|
(unsigned long)talloc_total_size(__ogs_talloc_core),
|
||||||
|
(unsigned long)talloc_total_blocks(__ogs_talloc_core),
|
||||||
|
(int)talloc_reference_count(__ogs_talloc_core),
|
||||||
|
__ogs_talloc_core);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case SIGUSR2:
|
||||||
talloc_report_full(__ogs_talloc_core, stderr);
|
talloc_report_full(__ogs_talloc_core, stderr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -35,8 +35,11 @@ ogs_sbi_request_t *pcf_nbsf_management_build_register(
|
||||||
ogs_sbi_nf_instance_t *nf_instance = NULL;
|
ogs_sbi_nf_instance_t *nf_instance = NULL;
|
||||||
ogs_sbi_nf_service_t *nf_service = NULL;
|
ogs_sbi_nf_service_t *nf_service = NULL;
|
||||||
|
|
||||||
int i, fqdn_len;
|
int i;
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
|
int fqdn_len;
|
||||||
char fqdn[OGS_MAX_FQDN_LEN];
|
char fqdn[OGS_MAX_FQDN_LEN];
|
||||||
|
#endif
|
||||||
|
|
||||||
ogs_assert(sess);
|
ogs_assert(sess);
|
||||||
pcf_ue = sess->pcf_ue;
|
pcf_ue = sess->pcf_ue;
|
||||||
|
@ -65,13 +68,17 @@ ogs_sbi_request_t *pcf_nbsf_management_build_register(
|
||||||
nf_service = ogs_list_first(&nf_instance->nf_service_list);
|
nf_service = ogs_list_first(&nf_instance->nf_service_list);
|
||||||
ogs_expect_or_return_val(nf_service, NULL);
|
ogs_expect_or_return_val(nf_service, NULL);
|
||||||
|
|
||||||
if (strlen(nf_service->fqdn)) {
|
if (nf_service->fqdn) {
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
memset(fqdn, 0, sizeof(fqdn));
|
memset(fqdn, 0, sizeof(fqdn));
|
||||||
fqdn_len = ogs_fqdn_build(fqdn,
|
fqdn_len = ogs_fqdn_build(fqdn,
|
||||||
nf_service->fqdn, strlen(nf_service->fqdn));
|
nf_service->fqdn, strlen(nf_service->fqdn));
|
||||||
PcfBinding.pcf_fqdn = ogs_memdup(fqdn, fqdn_len+1);
|
PcfBinding.pcf_fqdn = ogs_memdup(fqdn, fqdn_len+1);
|
||||||
ogs_expect_or_return_val(PcfBinding.pcf_fqdn, NULL);
|
ogs_expect_or_return_val(PcfBinding.pcf_fqdn, NULL);
|
||||||
PcfBinding.pcf_fqdn[fqdn_len] = 0;
|
PcfBinding.pcf_fqdn[fqdn_len] = 0;
|
||||||
|
#else
|
||||||
|
PcfBinding.pcf_fqdn = ogs_strdup(nf_service->fqdn);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PcfIpEndPointList = OpenAPI_list_create();
|
PcfIpEndPointList = OpenAPI_list_create();
|
||||||
|
|
|
@ -28,7 +28,9 @@ void af_nbsf_management_handle_pcf_binding(
|
||||||
OpenAPI_pcf_binding_t *PcfBinding = NULL;
|
OpenAPI_pcf_binding_t *PcfBinding = NULL;
|
||||||
OpenAPI_list_t *PcfIpEndPointList = NULL;
|
OpenAPI_list_t *PcfIpEndPointList = NULL;
|
||||||
OpenAPI_lnode_t *node = NULL;
|
OpenAPI_lnode_t *node = NULL;
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
char fqdn[OGS_MAX_FQDN_LEN];
|
char fqdn[OGS_MAX_FQDN_LEN];
|
||||||
|
#endif
|
||||||
|
|
||||||
ogs_assert(sess);
|
ogs_assert(sess);
|
||||||
ogs_assert(recvmsg);
|
ogs_assert(recvmsg);
|
||||||
|
@ -44,12 +46,19 @@ void af_nbsf_management_handle_pcf_binding(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (PcfBinding->pcf_fqdn) {
|
if (PcfBinding->pcf_fqdn) {
|
||||||
|
#if SBI_FQDN_WITH_ONE_OCTET_LENGTH
|
||||||
ogs_assert(0 < ogs_fqdn_parse(fqdn, PcfBinding->pcf_fqdn,
|
ogs_assert(0 < ogs_fqdn_parse(fqdn, PcfBinding->pcf_fqdn,
|
||||||
ogs_min(strlen(PcfBinding->pcf_fqdn), OGS_MAX_FQDN_LEN)));
|
ogs_min(strlen(PcfBinding->pcf_fqdn), OGS_MAX_FQDN_LEN)));
|
||||||
if (sess->pcf.fqdn)
|
if (sess->pcf.fqdn)
|
||||||
ogs_free(sess->pcf.fqdn);
|
ogs_free(sess->pcf.fqdn);
|
||||||
sess->pcf.fqdn = ogs_strdup(fqdn);
|
sess->pcf.fqdn = ogs_strdup(fqdn);
|
||||||
ogs_assert(sess->pcf.fqdn);
|
ogs_assert(sess->pcf.fqdn);
|
||||||
|
#else
|
||||||
|
if (sess->pcf.fqdn)
|
||||||
|
ogs_free(sess->pcf.fqdn);
|
||||||
|
sess->pcf.fqdn = ogs_strdup(PcfBinding->pcf_fqdn);
|
||||||
|
ogs_assert(sess->pcf.fqdn);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PcfIpEndPointList = PcfBinding->pcf_ip_end_points;
|
PcfIpEndPointList = PcfBinding->pcf_ip_end_points;
|
||||||
|
|
Loading…
Reference in New Issue