Project

General

Profile

Bug #10224

DHCP DDNS does not add zone entries for keys when using static host DDNS definitions

Added by Andreas Bleischwitz 10 months ago. Updated about 1 month ago.

Status:
Feedback
Priority:
Normal
Category:
DHCP (IPv4)
Target version:
Start date:
01/31/2020
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.4-p3
Affected Architecture:
All

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.

Associated revisions

Revision e5eba380 (diff)
Added by Viktor Gurov about 2 months ago

Create key and zone section for static DHCP mappings. Issue #10224

Revision fe640412 (diff)
Added by Viktor Gurov about 1 month ago

Hide DDNS key algorithm if DDNS is not used. Issue #10224

History

#1 Updated by Andreas Bleischwitz 10 months 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.

#3 Updated by Jim Pingle 10 months ago

  • Status changed from New to Pull Request Review

#5 Updated by Renato Botelho about 1 month 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!

#6 Updated by Steve Beaver about 1 month ago

  • Assignee changed from Renato Botelho to Andreas Bleischwitz

Please confirm fix

#7 Updated by Viktor Gurov about 1 month ago

Cosmetic js fix - hide DDNS key algorithm field if DDNS is not used:
https://gitlab.netgate.com/pfSense/pfSense/-/merge_requests/30

#8 Updated by Renato Botelho about 1 month 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

Also available in: Atom PDF