diff options
author | Stephen Beaver <sbeaver@netgate.com> | 2015-09-10 14:11:22 -0400 |
---|---|---|
committer | Stephen Beaver <sbeaver@netgate.com> | 2015-09-10 14:12:06 -0400 |
commit | c80e6a6acab3fd81e081aeb4e5ab2a247fdb42ab (patch) | |
tree | 999558a25012352cff58596ed9a7a24378da422c /src/usr/local/www/services_dhcpv6.php | |
parent | 842d9546bb141519862e49ce6a21e498d080768d (diff) | |
download | pfsense-c80e6a6acab3fd81e081aeb4e5ab2a247fdb42ab.zip pfsense-c80e6a6acab3fd81e081aeb4e5ab2a247fdb42ab.tar.gz |
services_router_advertisements.php: Bootstrap conversion complete
Diffstat (limited to 'src/usr/local/www/services_dhcpv6.php')
-rw-r--r-- | src/usr/local/www/services_dhcpv6.php | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php index 0dc8bd6..b837c27 100644 --- a/src/usr/local/www/services_dhcpv6.php +++ b/src/usr/local/www/services_dhcpv6.php @@ -80,8 +80,9 @@ $iflist = array_merge($iflist, get_configured_pppoe_server_interfaces()); if (!$if || !isset($iflist[$if])) { foreach ($iflist as $ifent => $ifname) { $oc = $config['interfaces'][$ifent]; + if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) || - (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) { + (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) { continue; } $if = $ifent; @@ -140,7 +141,7 @@ $dhcrelaycfg = $config['dhcrelay6']; if (is_array($dhcrelaycfg)) { foreach ($dhcrelaycfg as $dhcrelayif => $dhcrelayifconf) { if (isset($dhcrelayifconf['enable']) && isset($iflist[$dhcrelayif]) && - (!link_interface_to_bridge($dhcrelayif))) { + (!link_interface_to_bridge($dhcrelayif))) { $dhcrelay_enabled = true; } } @@ -190,9 +191,9 @@ if ($_POST) { $input_errors[] = gettext("A valid IPv6 address must be specified for the gateway."); } if (($_POST['dns1'] && !is_ipaddrv6($_POST['dns1'])) || - ($_POST['dns2'] && !is_ipaddrv6($_POST['dns2'])) || - ($_POST['dns3'] && !is_ipaddrv6($_POST['dns3'])) || - ($_POST['dns4'] && !is_ipaddrv6($_POST['dns4']))) { + ($_POST['dns2'] && !is_ipaddrv6($_POST['dns2'])) || + ($_POST['dns3'] && !is_ipaddrv6($_POST['dns3'])) || + ($_POST['dns4'] && !is_ipaddrv6($_POST['dns4']))) { $input_errors[] = gettext("A valid IPv6 address must be specified for each of the DNS servers."); } @@ -209,7 +210,7 @@ if ($_POST) { $input_errors[] = gettext("A valid primary domain name server IPv4 address must be specified for the dynamic domain name."); } if (($_POST['ddnsdomainkey'] && !$_POST['ddnsdomainkeyname']) || - ($_POST['ddnsdomainkeyname'] && !$_POST['ddnsdomainkey'])) { + ($_POST['ddnsdomainkeyname'] && !$_POST['ddnsdomainkey'])) { $input_errors[] = gettext("You must specify both a valid domain key and key name."); } if ($_POST['domainsearchlist']) { @@ -261,7 +262,7 @@ if ($_POST) { if (is_ipaddrv6($ifcfgip)) { if ((!is_inrange_v6($_POST['range_from'], $subnet_start, $subnet_end)) || - (!is_inrange_v6($_POST['range_to'], $subnet_start, $subnet_end))) { + (!is_inrange_v6($_POST['range_to'], $subnet_start, $subnet_end))) { $input_errors[] = gettext("The specified range lies outside of the current subnet."); } } @@ -288,7 +289,7 @@ if ($_POST) { continue; } if ((inet_pton($map['ipaddrv6']) > $dynsubnet_start) && - (inet_pton($map['ipaddrv6']) < $dynsubnet_end)) { + (inet_pton($map['ipaddrv6']) < $dynsubnet_end)) { $input_errors[] = sprintf(gettext("The DHCP range cannot overlap any static DHCP mappings.")); break; } @@ -458,9 +459,12 @@ if (is_subsystem_dirty('staticmaps')) $tab_array = array(); $tabscounter = 0; $i = 0; + foreach ($iflist as $ifent => $ifname) { $oc = $config['interfaces'][$ifent]; - if ((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) || + + + if((is_array($config['dhcpdv6'][$ifent]) && !isset($config['dhcpdv6'][$ifent]['enable']) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6'])))) || (!is_array($config['dhcpdv6'][$ifent]) && !(is_ipaddrv6($oc['ipaddrv6']) && (!is_linklocal($oc['ipaddrv6']))))) continue; @@ -472,6 +476,7 @@ foreach ($iflist as $ifent => $ifname) { $tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}"); $tabscounter++; } + /* tack on PPPoE or PPtP servers here */ /* pppoe server */ if (is_array($config['pppoes']['pppoe'])) { @@ -491,7 +496,7 @@ if (is_array($config['pppoes']['pppoe'])) { } } -if (empty($tabs_array)) { +if ($tabscounter == 0) { print_info_box(gettext("The DHCPv6 Server can only be enabled on interfaces configured with a static IPv6 address. This system has none."), 'danger'); include("foot.inc"); exit; |