summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-10-29 07:35:06 -0200
committerRenato Botelho <garga@FreeBSD.org>2013-10-29 07:35:06 -0200
commit34e178135b252d6664d1ba47dc877e099033ca7f (patch)
treebf756011712163e3e7729774755f3c8c20991341
parentbb6291e0204ffe2828fe9c9425bdae9c8541fe54 (diff)
downloadpfsense-34e178135b252d6664d1ba47dc877e099033ca7f.zip
pfsense-34e178135b252d6664d1ba47dc877e099033ca7f.tar.gz
Revert "Define dynamic gateway for GRE interfaces and do not user to define IP address to the interface. Fixes #3280"
Another solution will be implemented This reverts commit bb6291e0204ffe2828fe9c9425bdae9c8541fe54.
-rw-r--r--etc/inc/gwlb.inc4
-rw-r--r--etc/inc/interfaces.inc20
-rwxr-xr-xusr/local/www/interfaces.php5
3 files changed, 1 insertions, 28 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 92b90f3..012b288 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -483,8 +483,6 @@ function return_gateways_array($disabled = false, $localhost = false) {
default:
if (substr($ifcfg['if'], 0, 4) == "ovpn")
$ctype = "VPNv4";
- else if (substr($ifcfg['if'], 0, 3) == "gre")
- $ctype = "GREv4";
break;
}
$ctype = "_". strtoupper($ctype);
@@ -555,8 +553,6 @@ function return_gateways_array($disabled = false, $localhost = false) {
default:
if (substr($ifcfg['if'], 0, 4) == "ovpn")
$ctype = "VPNv6";
- else if (substr($ifcfg['if'], 0, 3) == "gre")
- $ctype = "GREv6";
break;
}
$ctype = "_". strtoupper($ctype);
diff --git a/etc/inc/interfaces.inc b/etc/inc/interfaces.inc
index 7ec1e06..7178a61 100644
--- a/etc/inc/interfaces.inc
+++ b/etc/inc/interfaces.inc
@@ -4622,7 +4622,7 @@ function get_interfaces_with_gateway() {
$ints[$ifdescr] = $ifdescr;
break;
default:
- if (preg_match('/^(ovpn|gre)/', $ifname['if']) ||
+ if (substr($ifname['if'], 0, 4) == "ovpn" ||
!empty($ifname['gateway']))
$ints[$ifdescr] = $ifdescr;
break;
@@ -4648,15 +4648,6 @@ function interface_has_gateway($friendly) {
default:
if (substr($ifname['if'], 0, 4) == "ovpn")
return true;
- if (substr($ifname['if'], 0, 3) == "gre" &&
- is_array($config['gres']['gre'])) {
- foreach ($config['gres']['gre'] as $gre) {
- if ($gre['greif'] != $ifname['if'])
- continue;
- if (is_ipaddrv4($gre['tunnel-remote-addr']))
- return true;
- }
- }
if (!empty($ifname['gateway']))
return true;
break;
@@ -4682,15 +4673,6 @@ function interface_has_gatewayv6($friendly) {
default:
if (substr($ifname['if'], 0, 4) == "ovpn")
return true;
- if (substr($ifname['if'], 0, 3) == "gre" &&
- is_array($config['gres']['gre'])) {
- foreach ($config['gres']['gre'] as $gre) {
- if ($gre['greif'] != $ifname['if'])
- continue;
- if (is_ipaddrv6($gre['tunnel-remote-addr']))
- return true;
- }
- }
if (!empty($ifname['gatewayv6']))
return true;
break;
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index f159cd6..0627e32 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -404,11 +404,6 @@ if ($_POST['apply']) {
} else if ($_POST) {
unset($input_errors);
-
- if (substr($wancfg['if'], 0, 3) == "gre" &&
- ($_POST['type'] != "none" || $_POST['type'] != "none"))
- $input_errors[] = gettext("You cannot set an IPv4 or IPv6 address to a GRE interface");
-
$pconfig = $_POST;
if (is_numeric("0x" . $_POST['track6-prefix-id--hex']))
$pconfig['track6-prefix-id'] = intval($_POST['track6-prefix-id--hex'], 16);
OpenPOWER on IntegriCloud