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
This commit is contained in:
Alexander Couzens 2021-09-06 17:47:16 +02:00
parent f27fbf65b7
commit 9cd9f6d53f
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}