Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    DHCP/GUI can write an invalid config file if quotes are present in a client-identifier on a static mapping

    Scheduled Pinned Locked Moved DHCP and DNS
    1 Posts 1 Posters 69 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      hpxca
      last edited by

      Hello,
      The bug tracking system says to report it in the forums before opening an issue so to reproduce:

      1. Run a DHCP server and create a static mapping
      2. 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.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.