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/.
daniel gerrit-no-reply at lists.osmocom.orgdaniel has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-gbproxy/+/23319 ) Change subject: gbproxy: Don't free NSE/BVC0 if SGSN NSE goes down ...................................................................... gbproxy: Don't free NSE/BVC0 if SGSN NSE goes down SGSN NSEs are static and should not be removed. Instead remove all PtP-BVCs. BVC0 can't be blocked and will be reset after the NSE becomes available again. It might be cleaner to remove BVC0 on NS failure and create it again, but that change is a bit more complicated. Fixes ttcn3 test after commit f96cac5077 broke them. Related: OS#4897 Change-Id: Ie0cef38e4423b672f5cba35ae7fc3eb2c4071d5a --- M src/gb_proxy.c 1 file changed, 9 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-gbproxy refs/changes/19/23319/1 diff --git a/src/gb_proxy.c b/src/gb_proxy.c index c07c36b..c01c5c6 100644 --- a/src/gb_proxy.c +++ b/src/gb_proxy.c @@ -1522,6 +1522,7 @@ /* TODO: bss nsei available/unavailable bssgp_tx_simple_bvci(BSSGP_PDUT_BVC_BLOCK, nsvc->nsei, bvc->bvci, 0); */ + int i; struct gbproxy_bvc *bvc; struct gbproxy_nse *nse; @@ -1552,12 +1553,17 @@ break; } if (nse->sgsn_facing) { + struct hlist_node *ntmp; /* SGSN */ /* TODO: When to block all PtP towards bss? Only if all SGSN are down? */ + hash_for_each_safe(nse->bvcs, i, ntmp, bvc, list) { + if (bvc->bvci == 0) + continue; + gbproxy_bvc_free(bvc); + } rate_ctr_inc(&cfg->ctrg-> ctr[GBPROX_GLOB_CTR_RESTART_RESET_SGSN]); } else { - int i; /* BSS became unavailable * Block matching PtP-BVCs on SGSN-side */ hash_for_each(nse->bvcs, i, bvc, list) { @@ -1576,10 +1582,9 @@ } } - + /* This frees the BVCs for us as well */ + gbproxy_nse_free(nse); } - /* This frees the BVCs for us as well */ - gbproxy_nse_free(nse); LOGP(DGPRS, LOGL_NOTICE, "NS-NSE %d became unavailable\n", nsp->nsei); break; default: -- To view, visit https://gerrit.osmocom.org/c/osmo-gbproxy/+/23319 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-gbproxy Gerrit-Branch: master Gerrit-Change-Id: Ie0cef38e4423b672f5cba35ae7fc3eb2c4071d5a Gerrit-Change-Number: 23319 Gerrit-PatchSet: 1 Gerrit-Owner: daniel <dwillmann at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210311/9d65af2a/attachment.htm>