pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27270 )


Change subject: GTP_Codec_Port: Check length field of GTPV1C received packets
......................................................................

GTP_Codec_Port: Check length field of GTPV1C received packets

Change-Id: Ie9447b7ec7f7f5ee35cd0393265f5edb5578bdaf
---
M library/GTP_CodecPort.ttcn
1 file changed, 5 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/70/27270/1

diff --git a/library/GTP_CodecPort.ttcn b/library/GTP_CodecPort.ttcn
index 317210e..b516611 100644
--- a/library/GTP_CodecPort.ttcn
+++ b/library/GTP_CodecPort.ttcn
@@ -14,6 +14,7 @@
        import from IPL4asp_Types all;
        import from GTPC_Types all;
        import from GTPU_Types all;
+       import from Misc_Helpers all;

        modulepar {
                SystemUnderTest mp_pl_SystemUnderTest := SGSN;
@@ -63,6 +64,10 @@
                out_ud.peer.remName := in_ud.remName;
                out_ud.peer.remPort := in_ud.remPort;
                out_ud.gtpc := dec_PDU_GTPC(in_ud.msg, pl_SystemUnderTest := 
mp_pl_SystemUnderTest);
+               if (lengthof(in_ud.msg) != out_ud.gtpc.lengthf + 8) {
+                       Misc_Helpers.f_shutdown(__BFILE__, __LINE__, fail,
+                               log2str("Rx GTPv1-C with field length ", 
out_ud.gtpc.lengthf, " + 8 != exp ", lengthof(in_ud.msg)));
+               }
        } with { extension "prototype(fast)" };



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/27270
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ie9447b7ec7f7f5ee35cd0393265f5edb5578bdaf
Gerrit-Change-Number: 27270
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <[email protected]>
Gerrit-MessageType: newchange

Reply via email to