Fix gbproxy_sgsn_by_tlli wraparound

Change-Id: I74ecb655f4d433f7ac14d00d934d237325aab606
Related: SYS#4865, OS#4472
This commit is contained in:
Daniel Willmann 2021-01-05 15:52:05 +01:00
parent 6964e88948
commit 3c56a2aeb5
1 changed files with 2 additions and 1 deletions

View File

@ -534,8 +534,9 @@ struct gbproxy_sgsn *gbproxy_sgsn_by_tlli(struct gbproxy_config *cfg, struct gbp
i++;
}
// Start again from the beginning
i = 0;
llist_for_each_entry(sgsn, &cfg->sgsns, list) {
if (i > index) {
if (i >= index) {
break;
} else if (sgsn->pool.allow_attach) {
return sgsn;