diff options
author | Seth Mos <seth.mos@dds.nl> | 2010-10-22 13:28:51 +0200 |
---|---|---|
committer | Seth Mos <seth.mos@dds.nl> | 2010-10-22 13:32:56 +0200 |
commit | 47593ac6ff761622a43e16cacb421acecede209d (patch) | |
tree | a14fa43f49ddcaead98b1d3ce216387292e7d38e /usr/local/www/system_gateways_edit.php | |
parent | be81b340240000c350895aa5c3e2840e9d7632ee (diff) | |
download | pfsense-47593ac6ff761622a43e16cacb421acecede209d.zip pfsense-47593ac6ff761622a43e16cacb421acecede209d.tar.gz |
Allow for configuring a IPv6 address on the interfaces page.
Add code to verify a ipv6 address
Let is_ipaddr() return true on a v4 and v6 address.
Change system gateways edit to fetch the global ipv6 interface ipv6 addresses and subnets
The current ipv6 function might need folding into filter_var() when that catches some documented corner cases.
The ajax widget on interfaces.php does not currently work for saving a IPv6 gateway address.
Gateways edit screen does not complain when using it's own IP address as the gateway. FIXME.
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-x | usr/local/www/system_gateways_edit.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php index 4848bed..8db2853 100755 --- a/usr/local/www/system_gateways_edit.php +++ b/usr/local/www/system_gateways_edit.php @@ -113,7 +113,11 @@ if ($_POST) { if (is_ipaddr($config['interfaces'][$_POST['interface']]['ipaddr']) && (empty($_POST['gateway']) || $_POST['gateway'] == "dynamic")) $input_errors[] = gettext("Dynamic gateway values cannot be specified for interfaces with a static ip configuration."); } - $parent_ip = get_interface_ip($_POST['interface']); + if(is_ipaddrv6($_POST['gateway'])) { + $parent_ip = get_interface_ipv6($_POST['interface']); + } else { + $parent_ip = get_interface_ip($_POST['interface']); + } if (is_ipaddr($parent_ip)) { $parent_sn = get_interface_subnet($_POST['interface']); if(!ip_in_subnet($_POST['gateway'], gen_subnet($parent_ip, $parent_sn) . "/" . $parent_sn)) { |