summaryrefslogtreecommitdiffstats
path: root/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-06-13 02:31:05 +0000
committerBill Marquette <billm@pfsense.org>2005-06-13 02:31:05 +0000
commitc98ddde28f541a4177616c37994d1e5c20b265e4 (patch)
treef282c1384a4e55ea60f99f4cec1b79a18c36e47f /usr/local/www/firewall_rules_edit.php
parent8dc950ac6e1baf9c6c8eb53b8650cdee1d2654b4 (diff)
downloadpfsense-c98ddde28f541a4177616c37994d1e5c20b265e4.zip
pfsense-c98ddde28f541a4177616c37994d1e5c20b265e4.tar.gz
Really create a "default" gateway that doesn't override the routing table
Diffstat (limited to 'usr/local/www/firewall_rules_edit.php')
-rwxr-xr-xusr/local/www/firewall_rules_edit.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php
index ad67024..ba570d0 100755
--- a/usr/local/www/firewall_rules_edit.php
+++ b/usr/local/www/firewall_rules_edit.php
@@ -95,6 +95,9 @@ if (isset($id) && $a_filter[$id]) {
$pconfig['max-src-conn-rate'] = $a_filter[$id]['max-src-conn-rate'];
$pconfig['max-src-conn-rates'] = $a_filter[$id]['max-src-conn-rates'];
+ /* Multi-WAN next-hop support
+ $pconfig['gateway'] = $a_filter[$id]['gateway'];
+
} else {
/* defaults */
if ($_GET['if'])
@@ -281,6 +284,10 @@ if ($_POST) {
unset($filterent['log']);
$filterent['descr'] = $_POST['descr'];
+ if ($_POST['gateway'] != "") {
+ $filterent['gateway'] = $_POST['gateway'];
+ }
+
if (isset($id) && $a_filter[$id])
$a_filter[$id] = $filterent;
else {
@@ -774,6 +781,7 @@ Hint: the difference between block and reject is that with reject, a packet (TCP
<?php
/* build a list of gateways */
$gateways = array();
+ $gateways[] = "default"; // default to don't use this feature :)
exec("/sbin/route -n get default |/usr/bin/grep gateway", $defroute);
preg_match("/(\d+\.\d+\.\d+\.\d+)/", $defroute[0], $matches);
$gateways[] = $matches[1];
@@ -792,8 +800,10 @@ Hint: the difference between block and reject is that with reject, a packet (TCP
$selected = " SELECTED";
else
$selected = "";
- if($gw <> "")
+ if($gw <> "" and $gw != "default")
echo "<option value=\"{$gw}\" {$selected}>{$gw}</option>\n";
+ elseif ($gw == "default")
+ echo "<option value=\"\" {$selected}>{$gw}</option>\n";
}
?>
</select>
OpenPOWER on IntegriCloud