summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/services_dhcp.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-12-24 12:46:54 +0545
committerRenato Botelho <renato@netgate.com>2016-12-26 12:37:58 -0200
commit1d52ceac8cf14dc59a6de88aa00efc965910bc0a (patch)
tree10db07e9c329cb33f8188f7dce9ad5c1586512b4 /src/usr/local/www/services_dhcp.php
parentc90bf891d2dd6801139763995ea85649f49dd39c (diff)
downloadpfsense-1d52ceac8cf14dc59a6de88aa00efc965910bc0a.zip
pfsense-1d52ceac8cf14dc59a6de88aa00efc965910bc0a.tar.gz
Customize DHCP Server on interfaces message
(cherry picked from commit b70904493917a5213ee4b752c5466b7d36f884b8)
Diffstat (limited to 'src/usr/local/www/services_dhcp.php')
-rw-r--r--src/usr/local/www/services_dhcp.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php
index fc9a35a..b856aab 100644
--- a/src/usr/local/www/services_dhcp.php
+++ b/src/usr/local/www/services_dhcp.php
@@ -771,13 +771,17 @@ if (is_subsystem_dirty('staticmaps')) {
$tab_array = array();
$tabscounter = 0;
$i = 0;
+$have_small_subnet = false;
foreach ($iflist as $ifent => $ifname) {
$oc = $config['interfaces'][$ifent];
/* Not static IPv4 or subnet >= 31 */
- if (!is_ipaddrv4($oc['ipaddr']) ||
- empty($oc['subnet']) || $oc['subnet'] >= 31) {
+ if ($oc['subnet'] >= 31) {
+ $have_small_subnet = true;
+ continue;
+ }
+ if (!is_ipaddrv4($oc['ipaddr']) || empty($oc['subnet'])) {
continue;
}
@@ -792,7 +796,12 @@ foreach ($iflist as $ifent => $ifname) {
}
if ($tabscounter == 0) {
- print_info_box(gettext("The DHCP Server can only be enabled on interfaces configured with a static IPv4 address. This system has none."));
+ if ($have_small_subnet) {
+ $sentence2 = gettext("This system's static IPv4 interfaces have subnet 31 or 32.");
+ } else {
+ $sentence2 = gettext("This system has none.");
+ }
+ print_info_box(gettext("The DHCP Server can only be enabled on interfaces configured with a static IPv4 address with subnet less than 31.") . " " . $sentence2);
include("foot.inc");
exit;
}
OpenPOWER on IntegriCloud