Skip to content

Commit

Permalink
Add option to configure DHCP domain whitelisting
Browse files Browse the repository at this point in the history
  • Loading branch information
danielvijge committed Feb 12, 2024
1 parent c49fdc2 commit dccb32f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions config/dhcp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ config dnsmasq
option localservice '1'
option domain '{{ local_domain }}'
option local '/{{ local_domain }}/'
{% if dhcp is defined and dhcp.domain_whitelist is defined %}
{% for domain in dhcp.domain_whitelist %}
list rebind_domain '{{ domain }}'
{% endfor %}
{% endif %}

config dhcp 'lan'
option interface 'lan'
Expand All @@ -29,7 +34,8 @@ config odhcpd 'odhcpd'
option maindhcp '0'
option leasefile '/tmp/hosts/odhcpd'
option leasetrigger '/usr/sbin/odhcpd-update'
option loglevel '4'
{# was 4, set to 3 to disable message 'No default route present, overriding ra_lifetime' #}
option loglevel '3'

{% for ap in aps %}
config host
Expand Down Expand Up @@ -60,4 +66,4 @@ config domain
option ip '{{ host.ip }}'

{% endfor %}
{% endif %}
{% endif %}

0 comments on commit dccb32f

Please sign in to comment.