summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-04-09 16:45:02 +0200
committersmos <seth.mos@dds.nl>2012-04-09 16:45:02 +0200
commit2fe06a3228848a9714a0488a4468d895f20b7a63 (patch)
tree0a1e10f642c8bf68933c8477fc6432f742b58de1
parent6e5d84ba22f252019e634152ca1a87d1b3d6dd74 (diff)
downloadpfsense-2fe06a3228848a9714a0488a4468d895f20b7a63.zip
pfsense-2fe06a3228848a9714a0488a4468d895f20b7a63.tar.gz
Remove this faulty piece of gateway code, it overwrites the existing entries that return_gateways_array() returns.
It doesn't take any address families into account either.
-rwxr-xr-xusr/local/www/interfaces.php34
1 files changed, 1 insertions, 33 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 3ce7ac8..8bd609f 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -693,39 +693,7 @@ if ($_POST['apply']) {
$wancfg['descr'] = remove_bad_chars($_POST['descr']);
$wancfg['enable'] = $_POST['enable'] == "yes" ? true : false;
- /* for dynamic interfaces we tack a gateway item onto the array to prevent system
- * log messages from appearing. They can also manually add these items */
- /* 1st added gateway gets a default bit */
- /* FIXME: Add address family check here! IPv6 needs a gateway bit too */
- if(!empty($a_gateways)) {
- $gateway_item = array();
- /* check for duplicates */
- $skip = false;
- foreach($a_gateways as $item) {
- if(($item['interface'] == "$if") && (trim($item['gateway']) == "dynamic")) {
- $skip4 = true;
- }
- if(($item['interface'] == "$if") && (trim($item['gateway']) == "dynamic6")) {
- $skip6 = true;
- }
- }
- if($skip4 == false) {
- $gateway_item['gateway'] = "dynamic";
- $gateway_item['descr'] = sprintf(gettext("Interface %s dynamic IPv4 gateway"),$if);
- $gateway_item['name'] = "GW_" . strtoupper($if);
- $gateway_item['interface'] = "{$if}";
- $gateway_item['family'] = "inet";
- } elseif($skip6 == false) {
- $gateway_item['gateway'] = "dynamic6";
- $gateway_item['descr'] = sprintf(gettext("Interface %s dynamic IPv6 gateway"),$if);
- $gateway_item['name'] = "GW_" . strtoupper($if) ."_v6";
- $gateway_item['interface'] = "{$if}";
- $gateway_item['family'] = "inet6";
- } else {
- unset($gateway_item);
- }
- }
-
+ /* let return_gateways_array() do the magic on dynamic interfaces for us */
switch($_POST['type']) {
case "staticv4":
$wancfg['ipaddr'] = $_POST['ipaddr'];
OpenPOWER on IntegriCloud