DHCP/GUI can write an invalid config file if quotes are present in a client-identifier on a static mapping
-
Hello,
The bug tracking system says to report it in the forums before opening an issue so to reproduce:- Run a DHCP server and create a static mapping
- In the static mapping use unescaped quotes ("). The GUI will write the entry like so
host s_lan_25 { hardware ethernet 40:a8:f0:ac:0c:d1; option dhcp-client-identifier "Host identifier aka "myhost""; fixed-address 1.2.3.4; option host-name "myhost"; }
This will result in dhcpd failing to start due to the unescaped quotes but no error or warning or anything at all to indicate the failure in the GUI.
Suggested fix: Check for unescaped quotes/invalid characters in this field (and possibly others) which could silently break dhcpd and/or ensure that the user is notified if dhcpd is not actually running after a change has been made.
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.