[test suite] multi-packet pcap test for pcap_dispatch() validation

This commit adds a new pcap file to the test suite with an SPA packet after
99 other garbage packets.  This can be used for pcap_dispatch() testing,
though this is not meant to be super instensive - it is just to ensure that
if a PCAP_DISPATCH_COUNT of, say, 10 is selected that the SPA is still seen
by fwknopd.  This commit is in support of #110.
This commit is contained in:
Michael Rash 2013-12-10 21:31:03 -06:00
parent 5f50ac22db
commit aeed8323f7
5 changed files with 18 additions and 2 deletions

View File

@ -188,6 +188,7 @@ EXTRA_DIST = \
test/conf/hmac_force_snat_access.conf \
test/conf/hmac_force_masq_access.conf \
test/conf/hmac_no_b64_cygwin_access.conf \
test/conf/multi_pkts.pcap \
test/conf/fwknoprc_default_hmac_base64_key \
test/conf/fwknoprc_hmac_key2 \
test/conf/fwknoprc_gpg_hmac_key \

BIN
test/conf/multi_pkts.pcap Normal file

Binary file not shown.

View File

@ -30,7 +30,8 @@ my $test_suite_path = 'test-fwknop.pl';
my $gpg_dir_orig_tar = 'gpg_dirs_orig.tar.gz';
our $gpg_client_home_dir = "$conf_dir/client-gpg";
our $gpg_client_home_dir_no_pw = "$conf_dir/client-gpg-no-pw";
our $replay_pcap_file = "$conf_dir/spa_replay.pcap";
our $replay_pcap_file = "$conf_dir/spa_replay.pcap";
our $multi_pkts_pcap_file = "$conf_dir/multi_pkts.pcap";
our $lib_dir = '../lib/.libs';

View File

@ -956,7 +956,7 @@
### --pcap-file
{
'category' => 'Rijndael',
'subcategory' => 'client+server',
'subcategory' => 'server',
'detail' => '--pcap-file processing',
'function' => \&process_pcap_file_directly,
'cmdline' => '',

View File

@ -106,6 +106,20 @@
'server_positive_output_matches' => [qr/Args\scontain\sinvalid\sdata/],
},
{
'category' => 'Rijndael+HMAC',
'subcategory' => 'server',
'detail' => '--pcap-file processing',
'function' => \&process_pcap_file_directly,
'cmdline' => '',
'fwknopd_cmdline' => "$fwknopdCmd -c $cf{'def'} -a $cf{'hmac_access'} " .
"-d $default_digest_file -p $default_pid_file " .
"--pcap-file $multi_pkts_pcap_file --foreground $verbose_str " .
"--verbose --verbose --verbose",
'fw_rule_created' => $NEW_RULE_REQUIRED,
'fw_rule_removed' => $NEW_RULE_REMOVED,
},
{
'category' => 'Rijndael+HMAC',
'subcategory' => 'client+server',