From 9cd9f6d53f9d9eae8b5d76bd31d9855240ee5ab3 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Mon, 6 Sep 2021 17:47:16 +0200 Subject: [PATCH] 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 --- src/gb/gprs_ns2_sns.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c index 7619b6667..0afc06ed2 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); }