Skip to content

ndhs v2024-12-31

Latest
Compare
Choose a tag to compare
@niklata niklata released this 31 Dec 08:04
4bfae89

Features

ndhs is now written in C rather than C++. The program is much more compact, both in memory and on disk. In principle, it should be more reliable as it performs far fewer allocations.

Breaking Changes

The syntax for comments in the config file has changed from C++-like // to POSIX-like #. The necessary changes can be performed with a simple GNU sed invocation:

sed -i -e 's|//|#|g' /etc/ndhs.conf

This change should result in a less surprising syntax, and will provide a better syntax highlighting experience in most editors.

There is also a change where the handling of multiple dns_server or ntp_server statements for a given interface now behaves differently. Previously, multiple statements would conceptually append together as a single statement. Now the most recent statement overrides prior statements.

Examples always suggested one or zero such statements per interface, so I do not expect this to be a problem with existing configurations.

Behavior Changes

IPv4 DNS and NTP addresses are now sent to IPv6 clients as IPv4-mapped addresses. This is not expected to break anything, and likely to allow setups to function where they may not have before.

DUIDs of up to 1024-bits are now tolerated. The RFC specifies that 1024-bits are valid, but I am not aware of any programs that use such large DUIDs and the suggested DUID formats are far smaller.

Notable Bugfixes

Redundant DNS and NTP address entries would be sent to clients if more than one address was defined for an interface.

The config parser would accept DUIDs formatted with '-' characters between each hexadecimal digit pair, as win32 ipconfig pretty-prints, but such values would not be properly parsed and would fail in use. Now ndhs rejects such DUIDs with an error message.

Saving and loading of dynamic leases across program restarts did not work because of trivial bugs. These are now fixed.