Bug #10224
closedDHCP DDNS does not add zone entries for keys when using static host DDNS definitions
100%
Description
The current implementation of dhcpdzones()
in etc/inc/services.inc
does not take the per host defined ddns zone and related keys into account, resulting in a unexpected behaviour of DHCP.
This seem to be caused by $sm['domain']
of services_dhcpdv4_configure()
not being added to $ddns_zones[]
in the loop foreach ($dhcpifconf['staticmap'] as $sm) {
.
The resulting configuration file /var/dhcpd/etc/dhcpd.conf
does not list any of the defined ddns-zones of a static defined host in the zone
section containing a key. As of this, an external DNS would not get updated on client registrations.
Updated by Andreas Bleischwitz over 4 years ago
By further looking at the code, I get the feeling that the configuration for DHCP should be made modular.
Currently the configuration of each interface is parsed and the configuration options for DHCP are build based on the settings.
Most of those settings are also given for a static mapping, but some of them are ignored. And they are parsed in a different loop which duplicates code maintenance.
Creating a generic DHCP parser for DHCP-options could be applicable for general options and static-host options.
This is just an idea.
Updated by Andreas Bleischwitz over 4 years ago
Created pull request:
Updated by Jim Pingle over 4 years ago
- Status changed from New to Pull Request Review
Updated by Viktor Gurov almost 4 years ago
Updated by Renato Botelho almost 4 years ago
- Status changed from Pull Request Review to Feedback
- Assignee set to Renato Botelho
- Target version set to 2.5.0
- % Done changed from 0 to 100
PR has been merged. Thanks!
Updated by Anonymous almost 4 years ago
- Assignee changed from Renato Botelho to Andreas Bleischwitz
Please confirm fix
Updated by Viktor Gurov almost 4 years ago
Cosmetic js fix - hide DDNS key algorithm field if DDNS is not used:
https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/30
Updated by Renato Botelho almost 4 years ago
Viktor Gurov wrote:
Cosmetic js fix - hide DDNS key algorithm field if DDNS is not used:
https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/30
Merged
Updated by Viktor Gurov over 3 years ago
add Secondary DDNS field:
https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/84
Updated by Jim Pingle over 3 years ago
- Status changed from Feedback to Pull Request Review
Updated by Renato Botelho over 3 years ago
- Status changed from Pull Request Review to Feedback
- Assignee changed from Andreas Bleischwitz to Viktor Gurov
PR has been merged. Thanks!
Updated by Viktor Gurov over 3 years ago
Updated by Jim Pingle over 3 years ago
- Status changed from Feedback to Pull Request Review
Updated by Renato Botelho over 3 years ago
- Status changed from Pull Request Review to Feedback
Merged
Updated by Viktor Gurov over 3 years ago
- Status changed from Feedback to Resolved
works as expected on 2.5.0.a.20210114.2350
dhcpd.conf example:
... host s_lan_0 { hardware ethernet 00:08:a2:0c:0b:8b; fixed-address 192.168.88.54; option host-name "mytesthost"; ddns-hostname "mytesthost"; ddns-domainname "lab.local"; ddns-update-style interim; } key "Key1" { algorithm hmac-md5; secret c2Rmc2RmZGYK; } subclass "s_lan" 1:00:08:a2:0c:0b:8b; ddns-update-style interim; update-static-leases on; zone lab.local. { primary 192.168.88.33; secondary 192.168.88.34; key "Key1"; }