summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2013-08-29 14:38:31 -0300
committerRenato Botelho <garga@FreeBSD.org>2013-08-29 14:38:31 -0300
commitbeb7cd97eb496e2d1f1e933344566e8e1927378f (patch)
tree3e02bacf8e188ceaa7e6a298c2c4e6ed5a5b4f24
parent58ddb24fc6925f681bbddbddc487eb8866fb4d1a (diff)
downloadpfsense-beb7cd97eb496e2d1f1e933344566e8e1927378f.zip
pfsense-beb7cd97eb496e2d1f1e933344566e8e1927378f.tar.gz
Use ipprotocol to check gateway protocol, this fix a issue that allow to set more than one default gateway when it's dynamic
-rwxr-xr-xusr/local/www/system_gateways_edit.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index 01cd7d0..417184c 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -391,12 +391,7 @@ if ($_POST) {
$i = 0;
/* remove the default gateway bits for all gateways with the same address family */
foreach($a_gateway_item as $gw) {
- if(is_ipaddrv4($gateway['gateway']) && is_ipaddrv4($gw['gateway'])) {
- unset($config['gateways']['gateway_item'][$i]['defaultgw']);
- if ($gw['interface'] != $_POST['interface'] && $gw['defaultgw'])
- $reloadif = $gw['interface'];
- }
- if(is_ipaddrv6($gateway['gateway']) && is_ipaddrv6($gw['gateway'])) {
+ if ($gateway['ipprotocol'] == $gw['ipprotocol']) {
unset($config['gateways']['gateway_item'][$i]['defaultgw']);
if ($gw['interface'] != $_POST['interface'] && $gw['defaultgw'])
$reloadif = $gw['interface'];
OpenPOWER on IntegriCloud