[SMF] Check config file for overlapping UE subnets for subnets with no DNN

This commit is contained in:
Matej Gradisar 2024-02-28 12:24:53 +01:00 committed by Sukchan Lee
parent 4d7f2fb661
commit 24b9150c15
1 changed files with 3 additions and 1 deletions

View File

@ -154,7 +154,9 @@ static int ogs_pfcp_check_subnet_overlapping(void)
ogs_list_for_each(&self.subnet_list, subnet){
for (next_subnet = ogs_list_next(subnet); (next_subnet);
next_subnet = ogs_list_next(next_subnet)) {
if (strcmp(subnet->dnn, next_subnet->dnn) == 0 &&
if ((strlen(subnet->dnn) == 0 ||
strlen(next_subnet->dnn) == 0 ||
(strcmp(subnet->dnn, next_subnet->dnn)) == 0) &&
subnet->gw.family == next_subnet->gw.family) {
uint32_t *addr1 = subnet->sub.sub;
uint32_t *addr2 = next_subnet->sub.sub;