]> git.proxmox.com Git - pve-firewall.git/commitdiff
fwtester: do not set packet default values
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 14 May 2014 11:20:53 +0000 (13:20 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 14 May 2014 11:20:53 +0000 (13:20 +0200)
test/fwtester.pl

index afbc7f682bbc03d71094257d0995ba108e5eb550..555e1516700ad15769450adbec98c4b27bff96cf 100755 (executable)
@@ -395,18 +395,21 @@ sub simulate_firewall {
     my $from = delete $test->{from} || die "missing 'from' field";
     my $to = delete $test->{to} || die "missing 'to' field";
     my $action = delete $test->{action} || die "missing 'action'";
-
+    
+    my $testid = delete $test->{id};
+    
     die "from/to needs to be different" if $from eq $to;
 
     my $pkg = {
        proto => 'tcp',
-       sport => '1234',
-       dport => '4321',
-       source => '10.11.12.13',
-       dest => '10.11.12.14',
+       sport => undef,
+       dport => undef,
+       source => undef,
+       dest => undef,
     };
 
     while (my ($k,$v) = each %$test) {
+       die "unknown attribute '$k'\n" if !exists($pkg->{$k});
        $pkg->{$k} = $v;
     }