Merge pull request #8 from drybjed/subnet-host-single
Fix support for subnets with only 1 host inside
This commit is contained in:
commit
f4c25b9099
@ -9,6 +9,10 @@ v0.1.1
|
||||
- Make sure that files specified in ``dhcpd_includes`` list exist before the
|
||||
DHCP server is restarted. [drybjed]
|
||||
|
||||
- Correctly handle IPv4 subnets with only 1 host inside. Previously they were
|
||||
parsed with errors, now ``debops.dhcpd`` will detect them hand handle
|
||||
separately from normal networks. [drybjed]
|
||||
|
||||
v0.1.0
|
||||
------
|
||||
|
||||
|
@ -71,7 +71,13 @@ group {
|
||||
{% if dhcpd_ipversion is defined and dhcpd_ipversion == '6' %}
|
||||
subnet6 {{ subnet.subnet | ipaddr('network') + '/' + subnet.subnet | ipaddr('prefix') | string }} {
|
||||
{% else %}
|
||||
subnet {{ subnet.subnet | ipaddr('cidr') | ipaddr('network') }} netmask {{ subnet.netmask | default(subnet.subnet | ipaddr('netmask')) }} {
|
||||
{% if (subnet.netmask is defined and (subnet.subnet + '/' + subnet.netmask) | ipaddr('cidr') | ipaddr('network')) %}
|
||||
subnet {{ (subnet.subnet + '/' + subnet.netmask) | ipaddr('cidr') | ipaddr('network') }} netmask {{ subnet.netmask }} {
|
||||
{% elif subnet.subnet | ipaddr('cidr') | ipaddr('network') %}
|
||||
subnet {{ subnet.subnet | ipaddr('cidr') | ipaddr('network') }} netmask {{ subnet.subnet | ipaddr('netmask') }} {
|
||||
{% else %}
|
||||
subnet {{ subnet.subnet | ipaddr('cidr') | ipaddr('address') }} netmask 255.255.255.255 {
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if subnet.routers is defined and subnet.routers %}
|
||||
{% if subnet.routers is string %}
|
||||
|
Loading…
Reference in New Issue
Block a user