[test suite] fix NAT DNS bad host check

This commit is contained in:
Michael Rash 2016-05-28 05:24:29 -07:00
parent 7f12fc72d1
commit 2937bc1058
2 changed files with 22 additions and 4 deletions

View File

@ -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;

View File

@ -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"}
},
{