diff options
author | Phil Davis <phil.davis@inf.org> | 2016-12-24 12:46:54 +0545 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-12-24 12:46:54 +0545 |
commit | b70904493917a5213ee4b752c5466b7d36f884b8 (patch) | |
tree | e759078c5f2328d0029534df7b850978a32fd3a3 /src/usr/local/www/services_dhcp.php | |
parent | a51dd381893142435e8cb9a7de967dfe83b8b1ec (diff) | |
download | pfsense-b70904493917a5213ee4b752c5466b7d36f884b8.zip pfsense-b70904493917a5213ee4b752c5466b7d36f884b8.tar.gz |
Customize DHCP Server on interfaces message
Diffstat (limited to 'src/usr/local/www/services_dhcp.php')
-rw-r--r-- | src/usr/local/www/services_dhcp.php | 15 |
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 e8847ce..d1361c6 100644 --- a/src/usr/local/www/services_dhcp.php +++ b/src/usr/local/www/services_dhcp.php @@ -743,13 +743,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; } @@ -764,7 +768,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; } |