DHCP Additional DHCP options issue
-
Playing with wpad and the such on 2.3, I have found I get an interesting error.
At the bottom under "Additional BOOTP/DHCP Options" when I use [Option 252 String "http://xxx.xxx.xxx.xxx/xxx.ext"] and click "Save" I get an error at the topโฆ
The following input errors were detected:
String type must be enclosed in quotes like "this" or must be a series of octets specified in hexadecimal, separated by colons, like 01:23:45:67:89cd:ef
String type must be enclosed in quotes like "this" or must be a series of octets specified in hexadecimal, separated by colons, like 01:23:45:67:89cd:ef
String type must be enclosed in quotes like "this" or must be a series of octets specified in hexadecimal, separated by colons, like 01:23:45:67:89cd:efAs far as I can tell, "http://192.168.1.2/wpad.dat" and so on is a valid entry is it not?
What is more interesting, if I have DHCP turned off, it lets me save the settings, but I can't turn DHCP on in the WebGUI with those entries present.
-
Hi,
I have done a little digging on the code and it seems it only supports up to option 99.
https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/services_dhcp.php#L228And there is an equivalent limitation on v6 as well:
https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/services_dhcpv6.php#L179(Not 100% sure about this, maybe someone more skilled can shed some light on this subject)
Regards,
Jorge M. OliveiraEdit!
Problem is that option is base64_encoded and not decoded while checking:
https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/services_dhcp.php#L233
https://github.com/pfsense/pfsense/blob/master/src/usr/local/www/services_dhcp.php#L379 -
i'm guessing the <99 points to the amount of individual entries/records | so not about the actual option_number
-
I've opened a PR that should fix the issue.
Please test if you can and let us know if it works.
https://github.com/pfsense/pfsense/pull/2492Thanks :)
-
I've opened a PR that should fix the issue.
Please test if you can and let us know if it works.
https://github.com/pfsense/pfsense/pull/2492Thanks :)
Merged, thanks!
-
Working great here so far, Thanks a lot!!! :)