ns2: ensure the NSVC is in the correct mode for NSVC UNKNOWN/NSVC BLOCKED cause codes

Those cause codes are only valid for BLOCK/RESET NSVCs.

Change-Id: I560f1c8c2826befd03641bebffe156ac070061c2
This commit is contained in:
Alexander Couzens 2021-09-07 15:30:02 +02:00 committed by laforge
parent 67cfc5dc9a
commit a2b846be2f
1 changed files with 5 additions and 0 deletions

View File

@ -103,6 +103,11 @@ static int ns2_validate_status(struct gprs_ns2_vc *nsvc, struct msgb *msg, struc
*cause = NS_CAUSE_MISSING_ESSENT_IE;
return -1;
}
if (nsvc->mode != GPRS_NS2_VC_MODE_BLOCKRESET) {
*cause = NS_CAUSE_PDU_INCOMP_PSTATE;
return -1;
}
break;
case NS_CAUSE_SEM_INCORR_PDU:
case NS_CAUSE_PDU_INCOMP_PSTATE: