summaryrefslogtreecommitdiffstats
path: root/usr/local/www
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:57 -0300
commit35eb76fa91915877924bdefdb35b39c0404d7969 (patch)
tree1569e619d23ef8c788a440f43e32242b421575bd /usr/local/www
parentb6239962e36f0f553340d67571d18a03155071b1 (diff)
downloadpfsense-35eb76fa91915877924bdefdb35b39c0404d7969.zip
pfsense-35eb76fa91915877924bdefdb35b39c0404d7969.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
Diffstat (limited to 'usr/local/www')
-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