diff options
author | Renato Botelho <renato@netgate.com> | 2016-01-25 10:05:38 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2016-01-25 10:05:38 -0200 |
commit | bbf31c76eb95912c2ae0e35e0daa40b43495b26c (patch) | |
tree | 0b7684bbd02ec516d02ba353782b1389011485c9 /src/etc | |
parent | fbe856f20953d88e5dbcfad7974900b958f48091 (diff) | |
parent | 3475eb0416efc371a00a846b81aa9657c6951d29 (diff) | |
download | pfsense-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.inc | 10 |
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'])) { |