From 4d643d5a78c36c5b888fe79659e4f1465cdaae1b Mon Sep 17 00:00:00 2001 From: Jos Schellevis Date: Fri, 20 Feb 2015 14:35:23 +0000 Subject: [PATCH] Fix DHCP6 Server GUI pages --- src/www/services_dhcpv6.php | 140 ++++---- src/www/services_dhcpv6_edit.php | 4 +- src/www/services_router_advertisements.php | 366 +++++++++++---------- 3 files changed, 260 insertions(+), 250 deletions(-) diff --git a/src/www/services_dhcpv6.php b/src/www/services_dhcpv6.php index 1b67ae609..03463ae9c 100644 --- a/src/www/services_dhcpv6.php +++ b/src/www/services_dhcpv6.php @@ -444,40 +444,6 @@ include("head.inc"); //]]> - $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']))))) - continue; - if ($ifent == $if) - $active = true; - else - $active = false; - $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'])) { - foreach($config['pppoes']['pppoe'] as $pppoe) { - if ($pppoe['mode'] == "server") { - $ifent = "poes". $pppoe['pppoeid']; - $ifname = strtoupper($ifent); - if ($ifent == $if) - $active = true; - else - $active = false; - $tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}"); - $tabscounter++; - } - } - } -?> @@ -494,34 +460,75 @@ include("head.inc");
+ $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']))))) + continue; + if ($ifent == $if) + $active = true; + else + $active = false; + $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'])) { + foreach($config['pppoes']['pppoe'] as $pppoe) { + if ($pppoe['mode'] == "server") { + $ifent = "poes". $pppoe['pppoeid']; + $ifname = strtoupper($ifent); + if ($ifent == $if) + $active = true; + else + $active = false; + $tab_array[] = array($ifname, $active, "services_dhcpv6.php?if={$ifent}"); + $tabscounter++; + } + } + } + if ($tabscounter == 0) { + //echo ""; + //include("fend.inc"); + //echo ""; + //echo ""; + echo "
"; + echo ""; + echo ""; + echo ""; + include("foot.inc"); + exit; + } + display_top_tabs($tab_array); + ?> - 0) display_top_tabs($tab_array); ?> +
- +

DHCP Relay is currently enabled. Cannot enable the DHCP Server service while the DHCP Relay is enabled on any interface.

- - - -
- - -