gprs_ns2: ensure the incoming NSVC is also the outgoing NSVC

Previous the SNS NSVC (the NSVC used for all SNS traffic) was never changed except
when the choosen NSVC went dead or got freed.
When receiving a SNS SIZE PDU over a different NSVC than the current SNS
NSVC the answer would be transmitted to a different port.

Change-Id: I36cd9488b8bca5cb99dae5cf50a55ee282e0557b
This commit is contained in:
Alexander Couzens 2021-09-04 00:44:18 +02:00
parent 1adfd23290
commit 3178e30206
1 changed files with 1 additions and 2 deletions

View File

@ -2326,8 +2326,7 @@ int ns2_sns_rx(struct gprs_ns2_vc *nsvc, struct msgb *msg, struct tlv_parsed *tp
/* FIXME: how to resolve SNS FSM Instance by NSEI (SGSN)? */
fi = nse->bss_sns_fi;
gss = (struct ns2_sns_state *) fi->priv;
if (!gss->sns_nsvc)
gss->sns_nsvc = nsvc;
gss->sns_nsvc = nsvc;
LOGPFSML(fi, LOGL_DEBUG, "NSEI=%u Rx SNS PDU type %s\n", nsei,
get_value_string(gprs_ns_pdu_strings, nsh->pdu_type));