This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has submitted this change. ( https://gerrit.osmocom.org/c/libosmocore/+/25151 ) Change subject: gprs_ns2_sns: ensure the SNS fsm behave correct when no signalling NSVCs are present ...................................................................... gprs_ns2_sns: ensure the SNS fsm behave correct when no signalling NSVCs are present When no remaining signalling NSVCs are available the SNS must be restarted (BSS) or go into unconfigured state (SGSN). Change-Id: I95e6bbb7a418d647a8426804879571597ae06ff8 --- M src/gb/gprs_ns2_sns.c 1 file changed, 19 insertions(+), 4 deletions(-) Approvals: Jenkins Builder: Verified laforge: Looks good to me, but someone else must approve daniel: Looks good to me, approved diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c index 22ca7b2..c1be0ab 100644 --- a/src/gb/gprs_ns2_sns.c +++ b/src/gb/gprs_ns2_sns.c @@ -201,6 +201,7 @@ if (reason) LOGPFSMLSRC(fi, LOGL_ERROR, file, line, "NSE %d: SNS failed: %s\n", gss->nse->nsei, reason); + gss->alive = false; if (gss->role == GPRS_SNS_ROLE_SGSN) { if (!gss->nse->persistent) gprs_ns2_free_nse(gss->nse); @@ -2599,19 +2600,33 @@ if (gss->block_no_nsvc_events) return; - if (alive == gss->alive) + if (gss->alive && nse->sum_sig_weight == 0) { + sns_failed(nse->bss_sns_fi, "No signalling NSVC available"); return; + } /* check if this is the current SNS NS-VC */ - if (nsvc == gss->sns_nsvc) { + if (nsvc == gss->sns_nsvc && !alive) { /* only replace the SNS NS-VC if there are other alive NS-VC. * There aren't any other alive NS-VC when the SNS fsm just reached CONFIGURED * and couldn't confirm yet if the NS-VC comes up */ - if (gss->alive && !alive) - ns2_sns_replace_nsvc(nsvc); + llist_for_each_entry(tmp, &nse->nsvc, list) { + if (nsvc == tmp) + continue; + if (ns2_vc_is_unblocked(nsvc)) { + ns2_sns_replace_nsvc(nsvc); + break; + } + } } + if (alive == gss->alive) + return; + if (alive) { + /* we need at least a signalling NSVC before become alive */ + if (nse->sum_sig_weight == 0) + return; gss->alive = true; osmo_fsm_inst_dispatch(nse->bss_sns_fi, NS2_SNS_EV_REQ_NSVC_ALIVE, NULL); } else { -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/25151 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I95e6bbb7a418d647a8426804879571597ae06ff8 Gerrit-Change-Number: 25151 Gerrit-PatchSet: 8 Gerrit-Owner: lynxis lazus <lynxis at fe80.eu> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: lynxis lazus <lynxis at fe80.eu> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210906/e1f084a3/attachment.htm>