[MME] Fix handling of unknown PLMN in S1 Setup Request (#3544, #3570)

```
TS36.413

8.7.3 S1 Setup
8.7.3.4 Abnormal Conditions
If the eNB initiates the procedure by sending a S1 SETUP REQUEST message
including the PLMN Identity IEs and none of the PLMNs provided by the eNB
is identified by the MME, then the MME shall reject the eNB S1 Setup Request
procedure with the appropriate cause value, e.g., “Unknown PLMN”
```

Modified code to address abnormal conditions where the eNB initiates
the S1 Setup Request with a PLMN Identity IE that is unrecognized by the MME.

In this case, the MME now properly rejects the S1 Setup Request
with the cause value "Unknown PLMN" in compliance with the 3GPP specification
(8.7.3.4).
This commit is contained in:
Sukchan Lee
2024-11-13 11:17:06 +09:00
parent 1519f73f0f
commit dd7217acde

View File

@@ -50,12 +50,17 @@ static bool maximum_number_of_enbs_is_reached(void)
static bool enb_plmn_id_is_foreign(mme_enb_t *enb)
{
int i;
int i, j, k;
for (i = 0; i < enb->num_of_supported_ta_list; i++) {
if (memcmp(&enb->plmn_id, &enb->supported_ta_list[i].plmn_id,
OGS_PLMN_ID_LEN) == 0)
return false;
for (i = 0; i < mme_self()->num_of_served_gummei; i++) {
for (j = 0; j < mme_self()->served_gummei[i].num_of_plmn_id; j++) {
for (k = 0; k < enb->num_of_supported_ta_list; k++) {
if (memcmp(&mme_self()->served_gummei[i].plmn_id[j],
&enb->supported_ta_list[k].plmn_id,
OGS_PLMN_ID_LEN) == 0)
return false;
}
}
}
return true;