GGSN: Test PDP Context activation wtih different PCOs
This commit is contained in:
parent
231b94190c
commit
ed7a17750f
|
@ -21,6 +21,8 @@ module GGSN_Tests {
|
|||
hexstring imsi,
|
||||
octetstring msisdn optional,
|
||||
octetstring apn,
|
||||
ProtConfigOptions pco_req optional,
|
||||
ProtConfigOptions pco_neg optional,
|
||||
EndUserAddress eua,
|
||||
OCT16 ip6_prefix optional,
|
||||
BIT4 nsapi,
|
||||
|
@ -229,7 +231,7 @@ module GGSN_Tests {
|
|||
template GTPC_PDUs ts_CreatePdpPDU(hexstring imsi, OCT1 restart_ctr, OCT4 teid_data, OCT4 teid_ctrl,
|
||||
BIT4 nsapi, EndUserAddress eua, octetstring apn,
|
||||
octetstring sgsn_ip_sign, octetstring sgsn_ip_data,
|
||||
octetstring msisdn) := {
|
||||
octetstring msisdn, template ProtConfigOptions pco := omit) := {
|
||||
createPDPContextRequest := {
|
||||
imsi := ts_Imsi(imsi),
|
||||
rai := omit,
|
||||
|
@ -258,7 +260,7 @@ module GGSN_Tests {
|
|||
trace_type := omit,
|
||||
endUserAddress := eua,
|
||||
accessPointName := ts_APN(apn),
|
||||
protConfigOptions := omit,
|
||||
protConfigOptions := pco,
|
||||
sgsn_addr_signalling := ts_GsnAddr(sgsn_ip_sign),
|
||||
sgsn_addr_traffic := ts_GsnAddr(sgsn_ip_data),
|
||||
msisdn := ts_Msisdn(msisdn),
|
||||
|
@ -289,12 +291,41 @@ module GGSN_Tests {
|
|||
OCT1 restart_ctr, OCT4 teid_data,
|
||||
OCT4 teid_ctrl, BIT4 nsapi, EndUserAddress eua,
|
||||
octetstring apn, octetstring sgsn_ip_sign,
|
||||
octetstring sgsn_ip_data, octetstring msisdn) := {
|
||||
octetstring sgsn_ip_data, octetstring msisdn,
|
||||
template ProtConfigOptions pco := omit) := {
|
||||
peer := peer,
|
||||
gtpc := ts_GTP1C_PDU(createPDPContextRequest, '00000000'O,
|
||||
valueof(ts_CreatePdpPDU(imsi, restart_ctr, teid_data, teid_ctrl,
|
||||
nsapi, eua, apn, sgsn_ip_sign,
|
||||
sgsn_ip_data, msisdn)), seq)
|
||||
sgsn_ip_data, msisdn, pco)), seq)
|
||||
}
|
||||
|
||||
template ProtConfigOptions ts_PCO := {
|
||||
type_gtpc := '84'O,
|
||||
lengthf := 0,
|
||||
configProtocol := '000'B,
|
||||
spare := '0000'B,
|
||||
extension0 := '1'B,
|
||||
protocols := {}
|
||||
}
|
||||
|
||||
|
||||
template ProtConfigOptions ts_PCO_IPv6_DNS modifies ts_PCO := {
|
||||
protocols := {
|
||||
{ protocolID := '0003'O, lengthProtoID := 0, protoIDContents := ''O }
|
||||
}
|
||||
}
|
||||
|
||||
template ProtConfigOptions ts_PCO_IPv4_DNS_IPCP modifies ts_PCO := {
|
||||
protocols := {
|
||||
{ protocolID := '8021'O, lengthProtoID := 16, protoIDContents := '01000010810600000000830600000000'O }
|
||||
}
|
||||
}
|
||||
|
||||
template ProtConfigOptions ts_PCO_IPv4_DNS_CONT modifies ts_PCO := {
|
||||
protocols := {
|
||||
{ protocolID := '000d'O, lengthProtoID := 0, protoIDContents := ''O }
|
||||
}
|
||||
}
|
||||
|
||||
function f_teardown_ind_IE(in template BIT1 ind) return template TearDownInd {
|
||||
|
@ -466,6 +497,7 @@ module GGSN_Tests {
|
|||
msisdn := msisdn,
|
||||
nsapi := f_rnd_nsapi(),
|
||||
apn := apn,
|
||||
pco_req := omit,
|
||||
eua := eua,
|
||||
teid := f_rnd_tei(),
|
||||
teic := f_rnd_tei(),
|
||||
|
@ -493,7 +525,7 @@ module GGSN_Tests {
|
|||
log("sending CreatePDP");
|
||||
f_send_gtpc(ctx, ts_GTPC_CreatePDP(g_peer_c, ctx.c_seq_nr, ctx.imsi, g_restart_ctr,
|
||||
ctx.teid, ctx.teic, ctx.nsapi, ctx.eua, ctx.apn,
|
||||
g_sgsn_ip_c, g_sgsn_ip_u, ctx.msisdn));
|
||||
g_sgsn_ip_c, g_sgsn_ip_u, ctx.msisdn, ctx.pco_req));
|
||||
T_default.start;
|
||||
d := activate(pingpong());
|
||||
alt {
|
||||
|
@ -503,6 +535,7 @@ module GGSN_Tests {
|
|||
ctx.teid_remote := cpr.teidDataI.teidDataI;
|
||||
ctx.teic_remote := cpr.teidControlPlane.teidControlPlane;
|
||||
ctx.eua := cpr.endUserAddress;
|
||||
ctx.pco_neg := cpr.protConfigOptions;
|
||||
setverdict(pass);
|
||||
} else {
|
||||
setverdict(fail);
|
||||
|
@ -537,12 +570,6 @@ module GGSN_Tests {
|
|||
/* IPv6 neighbor solicitation fe80::2 -> ff02::1:ff00:2 from 02:88:b5:1f:25:59 */
|
||||
const octetstring c_neigh_solicit:= '6000000000203afffe800000000000000000000000000002ff0200000000000000000001ff00000287009f9600000000fe80000000000000000000000000000201010288b51f2559'O;
|
||||
|
||||
testcase TC_activate_pdp4() runs on GT_CT {
|
||||
f_init();
|
||||
var PdpContext ctx := valueof(t_DefinePDP('262420123456789'H, '1234'O, valueof(t_ApnInternet), valueof(t_EuaIPv4Dyn)));
|
||||
f_pdp_ctx_act(ctx);
|
||||
}
|
||||
|
||||
/* template to generate a 'Prefix Information' ICMPv6 option */
|
||||
template OptionField ts_ICMP6_OptPrefix(OCT16 prefix, INT1 prefix_len) := {
|
||||
prefixInformation := {
|
||||
|
@ -724,11 +751,29 @@ module GGSN_Tests {
|
|||
T_default.stop;
|
||||
}
|
||||
|
||||
testcase TC_activate_pdp6() runs on GT_CT {
|
||||
testcase TC_pdp6_act_deact() runs on GT_CT {
|
||||
f_init();
|
||||
|
||||
var PdpContext ctx := valueof(t_DefinePDP('262420123456789'H, '1234'O, valueof(t_ApnInternet), valueof(t_EuaIPv6Dyn)));
|
||||
f_pdp_ctx_act(ctx);
|
||||
f_pdp_ctx_del(ctx, '1'B);
|
||||
}
|
||||
|
||||
testcase TC_pdp6_act_deact_pcodns() runs on GT_CT {
|
||||
f_init();
|
||||
|
||||
var PdpContext ctx := valueof(t_DefinePDP('262420123456789'H, '1234'O, valueof(t_ApnInternet), valueof(t_EuaIPv6Dyn)));
|
||||
ctx.pco_req := valueof(ts_PCO_IPv6_DNS);
|
||||
f_pdp_ctx_act(ctx);
|
||||
f_pdp_ctx_del(ctx, '1'B);
|
||||
}
|
||||
|
||||
testcase TC_pdp6_act_deact_icmp6() runs on GT_CT {
|
||||
f_init();
|
||||
|
||||
var PdpContext ctx := valueof(t_DefinePDP('262420123456789'H, '1234'O, valueof(t_ApnInternet), valueof(t_EuaIPv6Dyn)));
|
||||
ctx.pco_req := valueof(ts_PCO_IPv6_DNS);
|
||||
f_pdp_ctx_act(ctx);
|
||||
|
||||
//f_send_gtpu(ctx, c_router_solicit);
|
||||
//f_send_gtpu(ctx, c_neigh_solicit);
|
||||
|
@ -740,8 +785,34 @@ module GGSN_Tests {
|
|||
f_pdp_ctx_del(ctx, '1'B);
|
||||
}
|
||||
|
||||
testcase TC_pdp4_act_deact() runs on GT_CT {
|
||||
f_init();
|
||||
var PdpContext ctx := valueof(t_DefinePDP('262420123456789'H, '1234'O, valueof(t_ApnInternet), valueof(t_EuaIPv4Dyn)));
|
||||
f_pdp_ctx_act(ctx);
|
||||
f_pdp_ctx_del(ctx, '1'B);
|
||||
}
|
||||
|
||||
testcase TC_pdp4_act_deact_ipcp() runs on GT_CT {
|
||||
f_init();
|
||||
var PdpContext ctx := valueof(t_DefinePDP('262420123456789'H, '1234'O, valueof(t_ApnInternet), valueof(t_EuaIPv4Dyn)));
|
||||
f_pdp_ctx_act(ctx);
|
||||
f_pdp_ctx_del(ctx, '1'B);
|
||||
}
|
||||
|
||||
testcase TC_pdp4_act_deact_pcodns() runs on GT_CT {
|
||||
f_init();
|
||||
var PdpContext ctx := valueof(t_DefinePDP('262420123456789'H, '1234'O, valueof(t_ApnInternet), valueof(t_EuaIPv4Dyn)));
|
||||
f_pdp_ctx_act(ctx);
|
||||
f_pdp_ctx_del(ctx, '1'B);
|
||||
}
|
||||
|
||||
control {
|
||||
execute(TC_activate_pdp4());
|
||||
execute(TC_activate_pdp6());
|
||||
execute(TC_pdp4_act_deact());
|
||||
execute(TC_pdp4_act_deact_ipcp());
|
||||
execute(TC_pdp4_act_deact_pcodns());
|
||||
|
||||
execute(TC_pdp6_act_deact());
|
||||
execute(TC_pdp6_act_deact_pcodns());
|
||||
execute(TC_pdp6_act_deact_icmp6());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue