sgsn: Add TC_pdp_act_unattached

Change-Id: I162ab7cb74102e6f15c4d685c49575bcd0b4f41c
This commit is contained in:
Harald Welte 2018-02-18 14:39:11 +01:00
parent d71c343818
commit 835b15f799
2 changed files with 44 additions and 0 deletions

View File

@ -1766,6 +1766,22 @@ template PDU_L3_SGSN_MS tr_GMM_DET_ACCEPT_MT := {
}
}
template PDU_L3_SGSN_MS tr_GMM_DET_REQ_MT(template BIT3 dtt := ?, template boolean power_off := ?) := {
discriminator := '1000'B,
tiOrSkip := {
skipIndicator := '0000'B
},
msgs := {
gprs_mm := {
detachRequest_SGSN_MS := {
messageType := '00000101'B,
detachType := { dtt, bool2bit_tmpl(power_off) },
forceToStandby := ?,
gmmCause := *
}
}
}
}
function ts_ApnTLV(template (omit) octetstring apn) return template (omit) AccessPointNameTLV {
if (istemplatekind(apn, "omit")) {

View File

@ -895,6 +895,33 @@ testcase TC_attach_pdp_act() runs on test_CT {
vc_conn.done;
}
/* PDP Context activation for not-attached subscriber; expect fail */
private function f_TC_pdp_act_unattached(charstring id) runs on BSSGP_ConnHdlr {
var PdpActPars apars := valueof(t_PdpActPars);
BSSGP.send(ts_SM_ACT_PDP_REQ(apars.tid, apars.nsapi, apars.sapi, apars.qos, apars.addr,
apars.apn, apars.pco));
alt {
/* We might want toalso actually expect a PDPC CTX ACT REJ? */
[] BSSGP.receive(tr_BD_L3_MT(tr_GMM_DET_REQ_MT(?, ?))) {
setverdict(pass);
}
[] GTP.receive(tr_GTPC_MsgType(?, createPDPContextRequest, ?)) {
setverdict(fail, "Unexpected GTP PDP CTX ACT");
}
[] BSSGP.receive(tr_BD_L3_MT(tr_SM_ACT_PDP_ACCEPT(?, ?))) {
setverdict(fail, "Unexpected SM PDP CTX ACT ACK");
}
[] BSSGP.receive { repeat; }
}
}
testcase TC_pdp_act_unattached() runs on test_CT {
var BSSGP_ConnHdlr vc_conn;
f_init();
vc_conn := f_start_handler(refers(f_TC_pdp_act_unattached), testcasename(), g_gb[0], 18);
vc_conn.done;
}
control {
execute( TC_attach() );
@ -913,6 +940,7 @@ control {
execute( TC_detach_nopoweroff() );
execute( TC_detach_poweroff() );
execute( TC_attach_pdp_act() );
execute( TC_pdp_act_unattached() );
}