[test suite] additional non-HMAC SNAT tests
authorMichael Rash <mbr@cipherdyne.org>
Sun, 4 Aug 2013 08:51:39 +0000 (04:51 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Sun, 4 Aug 2013 08:51:39 +0000 (04:51 -0400)
test/tests/rijndael.pl
test/tests/rijndael_hmac.pl

index 92f1fe9..ed0160c 100644 (file)
     {
         'category' => 'Rijndael',
         'subcategory' => 'client+server',
+        'detail'   => "SNAT $internal_nat_host",
+        'function' => \&spa_cycle,
+        'cmdline'  => "$default_client_args -N $internal_nat_host:22",
+        'fwknopd_cmdline'  => "LD_LIBRARY_PATH=$lib_dir $valgrind_str " .
+            "$fwknopdCmd -c $cf{'snat'} -a $cf{'open_ports_access'} " .
+            "-d $default_digest_file -p $default_pid_file $intf_str",
+        'server_positive_output_matches' => [
+            qr/FWKNOP_FORWARD\s.*dport\s22\s/,
+            qr/to\:$internal_nat_host\:22/i],
+        'fw_rule_created' => $NEW_RULE_REQUIRED,
+        'fw_rule_removed' => $NEW_RULE_REMOVED,
+        'server_conf' => $cf{'snat'},
+        'fatal'    => $NO
+    },
+    {
+        'category' => 'Rijndael',
+        'subcategory' => 'client+server',
+        'detail'   => "SNAT MASQUERADE",
+        'function' => \&spa_cycle,
+        'cmdline'  => "$default_client_args -N $internal_nat_host:22",
+        'fwknopd_cmdline'  => "LD_LIBRARY_PATH=$lib_dir $valgrind_str " .
+            "$fwknopdCmd -c $cf{'snat_no_translate_ip'} -a $cf{'open_ports_access'} " .
+            "-d $default_digest_file -p $default_pid_file $intf_str",
+        'server_positive_output_matches' => [
+            qr/FWKNOP_FORWARD\s.*dport\s22\s/,
+            qr/to\:$internal_nat_host\:22/i,
+            qr/MASQUERADE\s.*to\-ports/,
+        ],
+        'fw_rule_created' => $NEW_RULE_REQUIRED,
+        'fw_rule_removed' => $NEW_RULE_REMOVED,
+        'server_conf' => $cf{'snat_no_translate_ip'},
+        'fatal'    => $NO
+    },
+
+    {
+        'category' => 'Rijndael',
+        'subcategory' => 'client+server',
         'detail'   => "NAT hostname->IP (tcp/22 ssh)",
         'function' => \&spa_cycle,
         'cmdline'  => "$default_client_args -N localhost:22",
index fd8e793..da8b90f 100644 (file)
     {
         'category' => 'Rijndael+HMAC',
         'subcategory' => 'client+server',
-        'detail'   => "iptables SNAT $internal_nat_host",
+        'detail'   => "SNAT $internal_nat_host",
         'function' => \&spa_cycle,
         'cmdline'  => "$default_client_args_no_get_key --rc-file " .
             "$cf{'rc_hmac_b64_key'} -N $internal_nat_host:22",
     {
         'category' => 'Rijndael+HMAC',
         'subcategory' => 'client+server',
-        'detail'   => "iptables SNAT MASQUERADE",
+        'detail'   => "SNAT MASQUERADE",
         'function' => \&spa_cycle,
         'cmdline'  => "$default_client_args_no_get_key --rc-file " .
             "$cf{'rc_hmac_b64_key'} -N $internal_nat_host:22",