]> git.proxmox.com Git - pve-firewall.git/commitdiff
fwtester: fix emulation - correctly set phydev_in
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 14 May 2014 11:55:59 +0000 (13:55 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 14 May 2014 11:55:59 +0000 (13:55 +0200)
test/fwtester.pl

index 9aa3c480627b88471012f615ccee9a44abdd9f70..2b577bafd1d92b3b62a508daaacd82c7d0a40071 100755 (executable)
@@ -294,6 +294,7 @@ sub route_packet {
        } elsif ($route_state =~ m/^vmbr\d+$/) {
            
            die "missing physdev_in - internal error?" if !$physdev_in;
+           $pkg->{physdev_in} = $physdev_in;
 
            if ($target->{type} eq 'host') {
 
@@ -307,7 +308,6 @@ sub route_packet {
                $chain = 'PVEFW-FORWARD';
                $pkg->{iface_in} = $route_state;
                $pkg->{iface_out} = $outside_bridge;
-               $pkg->{physdev_in} = $physdev_in;
                # conditionally set physdev_out (same behavior as kernel)
                if ($route_state eq $outside_bridge) {
                    $pkg->{physdev_out} = $outside_iface || die 'internal error';
@@ -326,7 +326,6 @@ sub route_packet {
                $chain = 'PVEFW-FORWARD';
                $pkg->{iface_in} = $route_state;
                $pkg->{iface_out} = $target->{bridge};
-               $pkg->{physdev_in} = $physdev_in;
                # conditionally set physdev_out (same behavior as kernel)
                if ($route_state eq $target->{bridge}) {
                    $pkg->{physdev_out} = $target->{fwpr} || die 'internal error';