mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
services_dhcp: Ignore BOOTP queries
BOOTP leases do not have a maximum lease time by default, this could
potentially lead to a DHCP address pool exhaustion.
This commit adds an option to ignore BOOTP queries.
Redmine #4351
(cherry picked from commit 6d53301b1f)
This commit is contained in:
parent
e366c80640
commit
0b95ff4c5f
@ -898,6 +898,11 @@ EOPP;
|
||||
$dhcpdconf .= " max-lease-time {$poolconf['maxleasetime']};\n";
|
||||
}
|
||||
|
||||
// ignore bootp
|
||||
if (isset($poolconf['ignorebootp'])) {
|
||||
$dhcpdconf .= " ignore bootp;\n";
|
||||
}
|
||||
|
||||
// netbios-name*
|
||||
if (is_array($poolconf['winsserver']) && $poolconf['winsserver'][0] && ($poolconf['winsserver'][0] != $dhcpifconf['winsserver'][0])) {
|
||||
$dhcpdconf .= " option netbios-name-servers " . join(",", $poolconf['winsserver']) . ";\n";
|
||||
|
||||
@ -199,6 +199,7 @@ if (is_array($dhcpdconf)) {
|
||||
$pconfig['domainsearchlist'] = $dhcpdconf['domainsearchlist'];
|
||||
list($pconfig['wins1'], $pconfig['wins2']) = $dhcpdconf['winsserver'];
|
||||
list($pconfig['dns1'], $pconfig['dns2'], $pconfig['dns3'], $pconfig['dns4']) = $dhcpdconf['dnsserver'];
|
||||
$pconfig['ignorebootp'] = isset($dhcpdconf['ignorebootp']);
|
||||
$pconfig['denyunknown'] = isset($dhcpdconf['denyunknown']);
|
||||
$pconfig['nonak'] = isset($dhcpdconf['nonak']);
|
||||
$pconfig['ddnsdomain'] = $dhcpdconf['ddnsdomain'];
|
||||
@ -564,6 +565,7 @@ if (isset($_POST['save'])) {
|
||||
$dhcpdconf['gateway'] = $_POST['gateway'];
|
||||
$dhcpdconf['domain'] = $_POST['domain'];
|
||||
$dhcpdconf['domainsearchlist'] = $_POST['domainsearchlist'];
|
||||
$dhcpdconf['ignorebootp'] = ($_POST['ignorebootp']) ? true : false;
|
||||
$dhcpdconf['denyunknown'] = ($_POST['denyunknown']) ? true : false;
|
||||
$dhcpdconf['nonak'] = ($_POST['nonak']) ? true : false;
|
||||
$dhcpdconf['ddnsdomain'] = $_POST['ddnsdomain'];
|
||||
@ -794,6 +796,13 @@ if (!is_numeric($pool) && !($act == "newpool")) {
|
||||
print_info_box(gettext('Editing pool-specific options. To return to the Interface, click its tab above.'), 'info', false);
|
||||
}
|
||||
|
||||
$section->addInput(new Form_Checkbox(
|
||||
'ignorebootp',
|
||||
'BOOTP',
|
||||
'Ignore BOOTP queries',
|
||||
$pconfig['ignorebootp']
|
||||
));
|
||||
|
||||
$section->addInput(new Form_Checkbox(
|
||||
'denyunknown',
|
||||
'Deny unknown clients',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user