diff options
author | Seth Mos <seth.mos@dds.nl> | 2011-02-07 08:34:33 +0100 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2011-02-07 08:34:33 +0100 |
commit | 2f14d0213c1dd0c9759adba87ba4ce503a0990df (patch) | |
tree | 219fa519e0ad983f74eac509c4cb72b3f49acc2f /usr/local | |
parent | 7f00aface2d9208199e965c0372f9a0272bee778 (diff) | |
download | pfsense-2f14d0213c1dd0c9759adba87ba4ce503a0990df.zip pfsense-2f14d0213c1dd0c9759adba87ba4ce503a0990df.tar.gz |
Make it possible to set the default gateway bit for 1 ipv4 gateway and 1 ipv6 gateway
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/system_gateways_edit.php | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php index 66ee192..6eef520 100755 --- a/usr/local/www/system_gateways_edit.php +++ b/usr/local/www/system_gateways_edit.php @@ -238,10 +238,18 @@ if ($_POST) { if ($_POST['defaultgw'] == "yes" || $_POST['defaultgw'] == "on") { $i = 0; + /* remove the default gateway bits for all gateways with the same address family */ foreach($a_gateway_item as $gw) { - unset($config['gateways']['gateway_item'][$i]['defaultgw']); - if ($gw['interface'] != $_POST['interface'] && $gw['defaultgw']) - $reloadif = $gw['interface']; + 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'])) { + unset($config['gateways']['gateway_item'][$i]['defaultgw']); + if ($gw['interface'] != $_POST['interface'] && $gw['defaultgw']) + $reloadif = $gw['interface']; + } $i++; } $gateway['defaultgw'] = true; |