Revision 3475eb04
Added by Andrew Pilloud almost 10 years ago
src/etc/inc/services.inc | ||
---|---|---|
776 | 776 |
} |
777 | 777 |
$dhcpdconf .= " allow members of \"" . str_replace(':', '', $mac) . "\";\n"; |
778 | 778 |
} |
779 |
$deny_action = "deny"; |
|
780 |
if (isset($poolconf['nonak'])) { |
|
781 |
$deny_action = "ignore"; |
|
782 |
} |
|
779 | 783 |
$mac_deny_list = array_unique(explode(',', $poolconf['mac_deny'])); |
780 | 784 |
foreach ($mac_deny_list as $mac) { |
781 | 785 |
if (empty($mac)) { |
782 | 786 |
continue; |
783 | 787 |
} |
784 |
$dhcpdconf .= " deny members of \"" . str_replace(':', '', $mac) . "\";\n";
|
|
788 |
$dhcpdconf .= " $deny_action members of \"" . str_replace(':', '', $mac) . "\";\n";
|
|
785 | 789 |
} |
786 | 790 |
|
787 | 791 |
if ($poolconf['failover_peerip'] <> "") { |
788 |
$dhcpdconf .= " deny dynamic bootp clients;\n";
|
|
792 |
$dhcpdconf .= " $deny_action dynamic bootp clients;\n";
|
|
789 | 793 |
} |
790 | 794 |
|
791 | 795 |
if (isset($poolconf['denyunknown'])) { |
792 |
$dhcpdconf .= " deny unknown-clients;\n";
|
|
796 |
$dhcpdconf .= " $deny_action unknown-clients;\n";
|
|
793 | 797 |
} |
794 | 798 |
|
795 | 799 |
if ($poolconf['gateway'] && $poolconf['gateway'] != "none" && ($poolconf['gateway'] != $dhcpifconf['gateway'])) { |
Also available in: Unified diff
Make DHCP deny action configurable