Merge remote-tracking branch 'amarx/firewall-dnat' into next
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Sep 2014 10:55:55 +0000 (12:55 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Sep 2014 10:55:55 +0000 (12:55 +0200)
Conflicts:
config/firewall/rules.pl

1  2 
config/firewall/rules.pl
html/cgi-bin/fwhosts.cgi

@@@ -291,22 -291,22 +291,24 @@@ sub buildrules 
  
                        foreach my $src (@sources) {
                                # Skip invalid source.
 -                              next unless (@$src[0]);
 +                              next unless (defined $src);
 +                              next unless ($src);
  
                                # Sanitize source.
-                               my $source = $src;
+                               my $source = @$src[0];
                                if ($source ~~ @ANY_ADDRESSES) {
                                        $source = "";
                                }
  
+                               my $source_intf = @$src[1];
                                foreach my $dst (@destinations) {
                                        # Skip invalid rules.
 -                                      next if (!@$dst[0] || (@$dst[0] eq "none"));
 +                                      next unless (defined $dst);
 +                                      next if (!$dst || ($dst eq "none"));
  
                                        # Sanitize destination.
-                                       my $destination = $dst;
+                                       my $destination = @$dst[0];
                                        if ($destination ~~ @ANY_ADDRESSES) {
                                                $destination = "";
                                        }
Simple merge