summaryrefslogtreecommitdiffstats
path: root/src/etc
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-25 10:05:38 -0200
committerRenato Botelho <renato@netgate.com>2016-01-25 10:05:38 -0200
commitbbf31c76eb95912c2ae0e35e0daa40b43495b26c (patch)
tree0b7684bbd02ec516d02ba353782b1389011485c9 /src/etc
parentfbe856f20953d88e5dbcfad7974900b958f48091 (diff)
parent3475eb0416efc371a00a846b81aa9657c6951d29 (diff)
downloadpfsense-bbf31c76eb95912c2ae0e35e0daa40b43495b26c.zip
pfsense-bbf31c76eb95912c2ae0e35e0daa40b43495b26c.tar.gz
Merge pull request #2025 from apilloud/dhcp-ignoreunknown
Diffstat (limited to 'src/etc')
-rw-r--r--src/etc/inc/services.inc10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/etc/inc/services.inc b/src/etc/inc/services.inc
index 2ad38b2..5319a72 100644
--- a/src/etc/inc/services.inc
+++ b/src/etc/inc/services.inc
@@ -817,20 +817,24 @@ EOPP;
}
$dhcpdconf .= " allow members of \"" . str_replace(':', '', $mac) . "\";\n";
}
+ $deny_action = "deny";
+ if (isset($poolconf['nonak'])) {
+ $deny_action = "ignore";
+ }
$mac_deny_list = array_unique(explode(',', $poolconf['mac_deny']));
foreach ($mac_deny_list as $mac) {
if (empty($mac)) {
continue;
}
- $dhcpdconf .= " deny members of \"" . str_replace(':', '', $mac) . "\";\n";
+ $dhcpdconf .= " $deny_action members of \"" . str_replace(':', '', $mac) . "\";\n";
}
if ($poolconf['failover_peerip'] <> "") {
- $dhcpdconf .= " deny dynamic bootp clients;\n";
+ $dhcpdconf .= " $deny_action dynamic bootp clients;\n";
}
if (isset($poolconf['denyunknown'])) {
- $dhcpdconf .= " deny unknown-clients;\n";
+ $dhcpdconf .= " $deny_action unknown-clients;\n";
}
if ($poolconf['gateway'] && $poolconf['gateway'] != "none" && ($poolconf['gateway'] != $dhcpifconf['gateway'])) {
OpenPOWER on IntegriCloud