From 041c63ed2a7e3903a7ea3a2b4cfb5b490bd87103 Mon Sep 17 00:00:00 2001 From: Eduardo Ramos Testillano Date: Sat, 21 Mar 2015 20:15:21 +0100 Subject: [PATCH] New test case for nested wrong avp (Media-Component-Description -> Media-Sub-Component -> Flow-Status) --- .../resources/basic/hex_examples/aar2-bad.hex | 1 + .../resources/basic/hex_examples/readme.txt | 10 +++++++ .../resources/basic/xml_examples/aar2.xml | 28 +++++++++++++++++++ .../BadAARtoServer/aar2-bad.hex | 1 + .../ProtocolErrors/BadAARtoServer/case_1.tc | 2 ++ .../ProtocolErrors/BadAARtoServer/case_2.tc | 13 +++++++++ 6 files changed, 55 insertions(+) create mode 100644 example/diameter/launcher/resources/basic/hex_examples/aar2-bad.hex create mode 100644 example/diameter/launcher/resources/basic/hex_examples/readme.txt create mode 100644 example/diameter/launcher/resources/basic/xml_examples/aar2.xml create mode 120000 example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/aar2-bad.hex create mode 100644 example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/case_2.tc diff --git a/example/diameter/launcher/resources/basic/hex_examples/aar2-bad.hex b/example/diameter/launcher/resources/basic/hex_examples/aar2-bad.hex new file mode 100644 index 0000000..4b5c1ed --- /dev/null +++ b/example/diameter/launcher/resources/basic/hex_examples/aar2-bad.hex @@ -0,0 +1 @@ +0100017cc000010901000014000000000000000000000107400000246f6373333b313333323737343433303b313b31333332373734343330000001024000000c01000014000001084000000c4f435333000001284000000c4f4353330000011b4000000c4f435333000001254000000c4f435333000001f8c000000f000028af3132320000000205c0000098000028af00000206c0000010000028af0000000000000207c000002c000028af000001fdc0000010000028af00000037000001ffc000000a000028af00000000000001f8c000000f000028af3132320000000204c0000010000028af0000007f00000203c0000010000028af00000085000001ffc0000010000028af00000002000001ca80000010000032db000000000000020fc0000010000028af00000000000001bb40000028000001c24000000c00000000000001bc4000001136323630333730393900000000000008000000133139322e3136382e302e31000000001e000000145741502e4d4f564953544152 diff --git a/example/diameter/launcher/resources/basic/hex_examples/readme.txt b/example/diameter/launcher/resources/basic/hex_examples/readme.txt new file mode 100644 index 0000000..9d01a0c --- /dev/null +++ b/example/diameter/launcher/resources/basic/hex_examples/readme.txt @@ -0,0 +1,10 @@ +Bad messages: + +aar-bad.hex: comes from ../xml_examples/aar.xml + Consists in a deliberated bad length encoded on grouped Subscription-Id length field (not multiple of 4). + +aar2-bad.hex: comes from ../xml_examples/aar2.xml + Consists in a deliberated bad length encoded on enumerated Flow-Status avp 2-level nested inside Media-Component-Description: + -> Media-Component-Description (grouped) + -> Media-Sub-Component (grouped) + -> Flow-Status (enumerated) diff --git a/example/diameter/launcher/resources/basic/xml_examples/aar2.xml b/example/diameter/launcher/resources/basic/xml_examples/aar2.xml new file mode 100644 index 0000000..c163fb4 --- /dev/null +++ b/example/diameter/launcher/resources/basic/xml_examples/aar2.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/aar2-bad.hex b/example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/aar2-bad.hex new file mode 120000 index 0000000..5a6586d --- /dev/null +++ b/example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/aar2-bad.hex @@ -0,0 +1 @@ +../../../../hex_examples/aar2-bad.hex \ No newline at end of file diff --git a/example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/case_1.tc b/example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/case_1.tc index 2fe63df..693bc94 100644 --- a/example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/case_1.tc +++ b/example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/case_1.tc @@ -1,3 +1,5 @@ +# Bad length encoded on grouped Subscription-Id length field (not multiple of 4). + # Send malformed AAR to the server: SENDHEX2E aar-bad.hex diff --git a/example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/case_2.tc b/example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/case_2.tc new file mode 100644 index 0000000..1727638 --- /dev/null +++ b/example/diameter/launcher/resources/ft-client/tests/experiment2/ProtocolErrors/BadAARtoServer/case_2.tc @@ -0,0 +1,13 @@ +# Bad length encoded on enumerated Flow-Status avp 2-level nested (Media-Component-Description -> Media-Sub-Component -> Flow-Status) + +# Send malformed AAR to the server: +SENDHEX2E aar2-bad.hex + +# Wait for message: +WAIT4MESSAGE + +# Check Failed-AVP & Subscription-Id within: +CHECKPATTERN +CHECKPATTERN ( *)