aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2021-09-06 17:47:16 +0200
committerAlexander Couzens <lynxis@fe80.eu>2021-09-07 20:46:04 +0200
commit9cd9f6d53f9d9eae8b5d76bd31d9855240ee5ab3 (patch)
treeb8a81c8dcba92cac4486ed7442ade1f1eee159c0 /src
parentf27fbf65b7b2df565778370393475850b0ba12f7 (diff)
ns2: fix a crash when receiving a SIZE while configured
The ns2_vc_force_unconfigured() needs to be protected otherwise it would free gss->nsvc which will be used later. It further would run into another SNS failure which is wrong too. Change-Id: If14b9e3fcd5d139457b10d06517302168091d8d8
Diffstat (limited to 'src')
-rw-r--r--src/gb/gprs_ns2_sns.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c
index 7619b666..0afc06ed 100644
--- a/src/gb/gprs_ns2_sns.c
+++ b/src/gb/gprs_ns2_sns.c
@@ -3021,7 +3021,9 @@ static void ns2_sns_st_all_action_sgsn(struct osmo_fsm_inst *fi, uint32_t event,
/* keep the NSVC we need for SNS, but unconfigure it */
gss->sns_nsvc->sig_weight = 0;
gss->sns_nsvc->data_weight = 0;
+ gss->block_no_nsvc_events = true;
ns2_vc_force_unconfigured(gss->sns_nsvc);
+ gss->block_no_nsvc_events = false;
ns2_sns_compute_local_ep_from_binds(fi);
}