From aafbe6e0f5104fbb50d69e0ef2c5932d9de93bec Mon Sep 17 00:00:00 2001 From: Diego Pino Garcia Date: Thu, 31 May 2018 09:53:02 +0200 Subject: [PATCH] Add end-to-end tests for pings with TTL lower than 64 Ping response should have a TTL value of 64 (default value). --- src/program/lwaftr/tests/data/add-vlan.sh | 2 ++ src/program/lwaftr/tests/data/ping-v4-ttl-32.pcap | Bin 0 -> 94 bytes .../lwaftr/tests/data/ping-v6-hop-limit-32.pcap | Bin 0 -> 114 bytes .../lwaftr/tests/data/vlan/ping-v4-ttl-32.pcap | Bin 0 -> 98 bytes .../tests/data/vlan/ping-v6-hop-limit-32.pcap | Bin 0 -> 118 bytes src/program/lwaftr/tests/end-to-end/test_env.sh | 12 ++++++++++++ 6 files changed, 14 insertions(+) create mode 100644 src/program/lwaftr/tests/data/ping-v4-ttl-32.pcap create mode 100644 src/program/lwaftr/tests/data/ping-v6-hop-limit-32.pcap create mode 100644 src/program/lwaftr/tests/data/vlan/ping-v4-ttl-32.pcap create mode 100644 src/program/lwaftr/tests/data/vlan/ping-v6-hop-limit-32.pcap diff --git a/src/program/lwaftr/tests/data/add-vlan.sh b/src/program/lwaftr/tests/data/add-vlan.sh index 3ce40ed452..ac74434529 100755 --- a/src/program/lwaftr/tests/data/add-vlan.sh +++ b/src/program/lwaftr/tests/data/add-vlan.sh @@ -47,6 +47,7 @@ V4=( udp-frominet-3frag-bound.pcap udp-frominet-bound.pcap ping-v4.pcap + ping-v4-ttl-32.pcap ping-v4-reply.pcap ping-v4-and-data.pcap ) @@ -110,6 +111,7 @@ V6=( udp-afteraftr-reassembled-ipv6-2frags.pcap udp-fromb4-2frags-bound.pcap ping-v6.pcap + ping-v6-hop-limit-32.pcap ping-v6-reply.pcap ping-v6-and-data.pcap ) diff --git a/src/program/lwaftr/tests/data/ping-v4-ttl-32.pcap b/src/program/lwaftr/tests/data/ping-v4-ttl-32.pcap new file mode 100644 index 0000000000000000000000000000000000000000..521d68d08ae89309818dc740e86940e424e29eec GIT binary patch literal 94 zcmca|c+)~A1{MYw`2U}Qff2|#y_`Q9BxVN1N?_mu1{@5o3=A3|WeSYTI1a2}5a0p= W4hFS#ARV6Ri8+~x3PlD6IaL5Qei3{C literal 0 HcmV?d00001 diff --git a/src/program/lwaftr/tests/data/ping-v6-hop-limit-32.pcap b/src/program/lwaftr/tests/data/ping-v6-hop-limit-32.pcap new file mode 100644 index 0000000000000000000000000000000000000000..90ddd2362438d300f5013ea3096e9e5d4c583d5e GIT binary patch literal 114 zcmca|c+)~A1{MYw`2U}Qff2|#yqrH8B<2OhN?_mu25ol}KvE)B3JQ!OyO>|kV~7j% s|NpPAa0>$m11AF)12+Q?11|#~1AhanTZNT1_n7*0DcP@kpKVy literal 0 HcmV?d00001 diff --git a/src/program/lwaftr/tests/data/vlan/ping-v4-ttl-32.pcap b/src/program/lwaftr/tests/data/vlan/ping-v4-ttl-32.pcap new file mode 100644 index 0000000000000000000000000000000000000000..b5ab942ba03505b43f804c52031ab1979394b109 GIT binary patch literal 98 zcmca|c+)~A1{MYw`2U}Qff2|#y_`Q9BxVK0N?_mu28|3XE*uQ53=A3|r3#G8I1a2} a5a0p=4hFS#AYGp6i8+~x3PlD6IaL6HI1)_& literal 0 HcmV?d00001 diff --git a/src/program/lwaftr/tests/data/vlan/ping-v6-hop-limit-32.pcap b/src/program/lwaftr/tests/data/vlan/ping-v6-hop-limit-32.pcap new file mode 100644 index 0000000000000000000000000000000000000000..f009d5de68b09c5bdb0e2f1194c808c7a4e663c4 GIT binary patch literal 118 zcmca|c+)~A1{MYw`2U}Qff2|#yqrH8B<2UjN?_mu28|4CX>E5CK++;s3JQ!OyO>|k wV~7j%|NpPAa0>$m11AF)12+Q?11|#~1AhanTZNT1_n7*0ONNWh5!Hn literal 0 HcmV?d00001 diff --git a/src/program/lwaftr/tests/end-to-end/test_env.sh b/src/program/lwaftr/tests/end-to-end/test_env.sh index e414381bdf..632f536a11 100755 --- a/src/program/lwaftr/tests/end-to-end/test_env.sh +++ b/src/program/lwaftr/tests/end-to-end/test_env.sh @@ -385,18 +385,30 @@ TEST_DATA=( "no_icmp_with_filters_drop.conf" "tcp-frominet-trafficclass.pcap" "" "" "" "in-1p-ipv4-out-0p-drop.lua" +# Ping to lwAFTR (IPv4). + "ICMP Echo to AFTR (IPv4)" "no_icmp.conf" "ping-v4.pcap" "" "ping-v4-reply.pcap" "" "nofrag4.lua" +"ICMP Echo to AFTR (IPv4) (ttl=32)" +"no_icmp.conf" "ping-v4-ttl-32.pcap" "" "ping-v4-reply.pcap" "" +"nofrag4.lua" + "ICMP Echo to AFTR (IPv4) + data" "no_icmp.conf" "ping-v4-and-data.pcap" "" "ping-v4-reply.pcap" "tcp-afteraftr-ipv6.pcap" "in-1p-ipv4-out-1p-ipv6-echo.lua" +# Ping to lwAFTR (IPv6). + "ICMP Echo to AFTR (IPv6)" "no_icmp.conf" "" "ping-v6.pcap" "" "ping-v6-reply.pcap" "icmpv6-ping-and-reply.lua" +"ICMP Echo to AFTR (IPv6) (hop-limit=32)" +"no_icmp.conf" "" "ping-v6-hop-limit-32.pcap" "" "ping-v6-reply.pcap" +"icmpv6-ping-and-reply.lua" + "ICMP Echo to AFTR (IPv6) + data" "no_icmp.conf" "" "ping-v6-and-data.pcap" "decap-ipv4.pcap" "ping-v6-reply.pcap" "in-1p-ipv6-out-1p-ipv4-4-and-echo.lua"