diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-08-29 14:38:31 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-08-29 14:38:31 -0300 |
commit | beb7cd97eb496e2d1f1e933344566e8e1927378f (patch) | |
tree | 3e02bacf8e188ceaa7e6a298c2c4e6ed5a5b4f24 /usr/local/www | |
parent | 58ddb24fc6925f681bbddbddc487eb8866fb4d1a (diff) | |
download | pfsense-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
Diffstat (limited to 'usr/local/www')
-rwxr-xr-x | usr/local/www/system_gateways_edit.php | 7 |
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']; |