diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2021-07-20 22:15:40 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2021-08-06 20:06:14 +0200 |
commit | 2da25b42a8e68d2b0e1a7815943f1117d2ac3fd8 (patch) | |
tree | 392a9396252ace568c1fef113cdef5db986a9bdf /src/gb/gprs_ns2_sns.c | |
parent | a65731ede5f822cd101d97b66b6c1fe9696ed156 (diff) |
gprs_ns2: improve reselection protection
Change-Id: I375a7639fb8e0f92fd67bb4176bd6219978aa428
Diffstat (limited to 'src/gb/gprs_ns2_sns.c')
-rw-r--r-- | src/gb/gprs_ns2_sns.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c index 6773cef6..306332b0 100644 --- a/src/gb/gprs_ns2_sns.c +++ b/src/gb/gprs_ns2_sns.c @@ -2202,6 +2202,9 @@ static void ns2_sns_st_all_action_bss(struct osmo_fsm_inst *fi, uint32_t event, /* TODO: keep the order of binds when data != NULL */ /* tear down previous state * gprs_ns2_free_nsvcs() will trigger NO_NSVC, prevent this from triggering a reselection */ + if (gss->reselection_running) + break; + gss->reselection_running = true; while (!llist_empty(&nse->nsvc)) { nsvc = llist_first_entry(&nse->nsvc, struct gprs_ns2_vc, list); @@ -2215,6 +2218,7 @@ static void ns2_sns_st_all_action_bss(struct osmo_fsm_inst *fi, uint32_t event, gss->initial = NULL; ns2_prim_status_ind(gss->nse, NULL, 0, GPRS_NS2_AFF_CAUSE_SNS_NO_ENDPOINTS); osmo_fsm_inst_state_chg(fi, GPRS_SNS_ST_UNCONFIGURED, 0, 3); + gss->reselection_running = false; return; } else if (!gss->initial) { gss->initial = llist_first_entry(&gss->sns_endpoints, struct sns_endpoint, list); |