Add test case: inject IPv4 based TCP RST packet after recv Sub-ACK
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "packet_injector_test_frame.h"
|
||||
|
||||
#if 1
|
||||
TEST(INJECT_IPV4_BASED_TCP_RST, AFTER_RECV_SYN_ACK)
|
||||
{
|
||||
struct packet_injector_case test = {
|
||||
@@ -31,6 +32,39 @@ TEST(INJECT_IPV4_BASED_TCP_RST, AFTER_RECV_SYN_ACK)
|
||||
|
||||
packet_injector_test_frame_run(&test);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
TEST(INJECT_IPV4_BASED_TCP_RST, AFTER_RECV_SUB_ACK)
|
||||
{
|
||||
struct packet_injector_case test = {
|
||||
// descriptor
|
||||
.finish_clean_work_dir = 1,
|
||||
.descriptor = "Inject IPv4 based TCP RST after receiving SUB-ACK packet.",
|
||||
.work_dir = "/tmp/inject_ipv4_based_tcp_rst_after_recv_sub_ack/", // user defined work directory
|
||||
|
||||
// prefix
|
||||
.input_prefix = "pcap/inject_ipv4_based_tcp_rst_after_recv_sub_ack/test/",
|
||||
.output_prefix = "/tmp/",
|
||||
|
||||
// input pcap
|
||||
.input_pcap = "input.pcap",
|
||||
|
||||
// compare
|
||||
.c2s_expect_pcap = "expect-192.0.2.211:42242-192.0.2.110:80-1.pcap",
|
||||
.c2s_output_pcap = "inject-192.0.2.211:42242-192.0.2.110:80-1.pcap",
|
||||
|
||||
.s2c_expect_pcap = "expect-192.0.2.110:80-192.0.2.211:42242-2.pcap",
|
||||
.s2c_output_pcap = "inject-192.0.2.110:80-192.0.2.211:42242-2.pcap",
|
||||
|
||||
// packet injector command
|
||||
.packet_injector_cmd = "./packet_injector -t tcp-rst -c c2s-packet -n 2",
|
||||
.diff_skip_pattern = "-I frame.time -I frame.time_epoch -I ip.id -I ip.ttl -I ip.checksum -I tcp.checksum -I tcp.window_size",
|
||||
};
|
||||
|
||||
packet_injector_test_frame_run(&test);
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user