diff --git a/test/test-fwknop.pl b/test/test-fwknop.pl index 17ffc708..8c3aeb59 100755 --- a/test/test-fwknop.pl +++ b/test/test-fwknop.pl @@ -3103,6 +3103,26 @@ sub use_terminal_run_client() { return &run_cmd($test_hr->{'cmdline'}, $cmd_out_tmp, $curr_test_file); } +sub predef_pkts_spa_cycle() { + my $test_hr = shift; + + my @packets = ( + { + 'proto' => 'udp', + 'port' => $default_spa_port, + 'dst_ip' => $loopback_ip, + 'data' => $test_hr->{'pkt'}, + }, + ); + + my ($rv, $server_was_stopped, $fw_rule_created, $fw_rule_removed) + = &client_server_interaction($test_hr, \@packets, $USE_PREDEF_PKTS); + + $rv = 0 unless &process_output_matches($test_hr); + + return $rv; +} + sub spa_cycle() { my $test_hr = shift; @@ -3113,6 +3133,7 @@ sub spa_cycle() { return $rv; } + sub tcp_spa_cycle() { my $test_hr = shift; diff --git a/test/tests/rijndael_hmac.pl b/test/tests/rijndael_hmac.pl index e5130886..0a92db4e 100644 --- a/test/tests/rijndael_hmac.pl +++ b/test/tests/rijndael_hmac.pl @@ -1642,9 +1642,7 @@ 'category' => 'Rijndael+HMAC', 'subcategory' => 'client+server', 'detail' => "NAT_DNS invalid host", - 'function' => \&spa_cycle, - 'cmdline' => "$default_client_args_no_get_key --rc-file " . - "$cf{'rc_hmac_b64_key'} -N bad%host:22", + 'function' => \&predef_pkts_spa_cycle, 'pkt' => '86uMfbb7AitlOEck6O0qJDtKK+GyTSnpxaL3iyCTzg+P0iRgMLRjt3Og4YmrG' . '54AqaCg5M3tsqr3lF0E+mlMnNDtTy40nPc46psbreD1GqZ5fQkxri2IhhCSbA' . @@ -1656,7 +1654,6 @@ qr/Invalid Hostname in NAT SPA message/ ], 'fw_rule_created' => $REQUIRE_NO_NEW_RULE, - 'key_file' => $cf{'rc_hmac_b64_key'}, 'server_conf' => $cf{"${fw_conf_prefix}_nat_disable_aging"} }, {