]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
firewall: rules.pl: Catch invalid configurations.
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 21 Mar 2014 12:33:08 +0000 (13:33 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 21 Mar 2014 12:33:08 +0000 (13:33 +0100)
config/firewall/rules.pl

index d9c9b5cc0e1e7604df8ebfbb8768c2ab756cd011..a131c54a8ed8fe6835eee0525a1c74d36d8d705b 100755 (executable)
@@ -337,6 +337,11 @@ sub buildrules {
 
                                                        # Use iptables DNAT
                                                        } else {
+                                                               if ($destination_is_firewall && !$destination) {
+                                                                       $destination = &fwlib::get_external_address();
+                                                               }
+                                                               next unless ($destination);
+
                                                                my ($dnat_address, $dnat_mask) = split("/", $destination);
                                                                @destination_options = ("-d", $dnat_address);