[possible bug] DHCP configuration file problems
-
New pfSense installation (on Proxmox for the time being). The DHCP service won't start. I get the following messages:
/etc/dhcpd.conf line 431: semicolon expected.
option dhcp-client-identifier "Panasonic 65" TV
^
/etc/dhcpd.conf line 451 eof in string constant
}
^
/etc/dhcpd.conf line 451 unexpected end of file
}
^
Configuration file errors encountered -- exitingAny help on how to fix the file would be appreciated, including how to get to the file with an editor. Nano doesn't work.
-
@stan
Never mind. I removed the quote mark after Panasonic 65, and the DHCP services started. -
Sounds like a good bug to be reported though... string handling in the pfSense code is allowing something like that to get through.
https://redmine.pfsense.org/
-
Yea, I think so too, so I took a look at the process. They discourage reports and their process would take several hours to get through, so I'll pass. I know enough not to repeat my mistake.
-
@stan So in pfSense, what field did you enter "Panasonic 65 TV" into? Because if I'm reading that config file right (I guess I missed this yesterday), the Client Identifier would be used if the device sent something other than a MAC address to the DHCP server to identify itself (not common, but not impossible). So that "client identifier" field should be left empty in probably 99% of cases. The "Description" field is internal to pfSense and can take just about anything character-wise... that would likely be where you want to put that information.
Also... nano isn't part of the default pfSense packages, but can be installed. SSH to your box, choose option 8 for the shell, then run "pkg install nano". However, a config file like that shouldn't be manually edited anyway, as the next time a change is made in pfSense it will re-write the config file with information from its own records, negating any change you had manually made.
-
@stan said in DHCP configuration file problems:
Yea, I think so too, so I took a look at the process. They discourage reports and their process would take several hours to get through, so I'll pass. I know enough not to repeat my mistake.
process? afaik posting to this forum would be enough.
Just change your title post to something like "[possible bug] input validation dhcp service"
devs will more then likely see it & create a redmine ticket themself or one of the mods will draw their attention.i can reproduce this problem where a " is allowed to be entered in the dhcp-client-identifier field.
This causes an error in the dhcp conf:/status_services.php: The command '/usr/local/sbin/dhcpd -user dhcpd -group _dhcp -chroot /var/dhcpd -cf /etc/dhcpd.conf -pf /var/run/dhcpd.pid vmx0' returned exit code '1', the output was 'Internet Systems Consortium DHCP Server 4.4.1 Copyright 2004-2018 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/ /etc/dhcpd.conf line 27: semicolon expected. option host-name " ^ /etc/dhcpd.conf line 32: eof in string constant ^ /etc/dhcpd.conf line 32: unexpected end of file ^ Configuration file errors encountered -- exiting If you think you have received this message due to a bug rather than a configuration issue please read the section on submitting bugs on either our web page at www.isc.org or in the README file before submitting a bug. These pages explain the proper process and the information we find helpful for debugging. exiting.'
-
vergiliomi, yes I entered the quote symbol in the Client Identifier field, and that was my mistake. When I discovered that removing the symbol fixed the problem, I realized that that field was the wrong place for my descriptor and moved them all to the Description field. I don't plan to install Nano.
heper, I'm new to pfSense and to this forum. I don't know how to change the title of my post.
-
@johnpoz would you mind to update the title ?
-
@heper Updated.