Bug #962
closedDHCP custom options must have type selection
100%
Description
The custom DHCP options are currently all added as text type. This doesn't work for many options, which require a different type. e.g. option 2 must be 'integer signed 32'.
To resolve, we need a drop down box added for each custom option to select the type. The possible options are:
text
string
boolean
integer unsigned 8
integer unsigned 16
integer unsigned 32
integer signed 8
integer signed 16
integer signed 32
ip-address
See also: http://www.daemon-systems.org/man/dhcp-options.5.html
Note for some of these types, the data is not enclosed in quotes, such as integers for one.
There are a couple other types, but not ones we're concerned with at this time.
Updated by Erik Fonnesbeck almost 14 years ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied in changeset 678dfd0fa8d629bd45edad576c99d03aa8f40d70.
Updated by Jon Bruce over 13 years ago
Functions on Mon Nov 1 15:45:03 EDT 2010 firmware. Tested with "1(https://wsm.mydomain.com:5070/oap/sac_pkg" for a Motorola TEAM phone which grabs Option 43 - vendor specific information from the DHCP server.
This is handy, thanks for the request and thanks to the developers for adding it!
Updated by Chris Buechler over 13 years ago
- Status changed from Feedback to New
- Priority changed from Normal to High
- % Done changed from 100 to 90
One issue with this on the integers. It's putting int8, int16, uint8, etc. into dhcpd.conf file which is invalid syntax. It has to be exactly as listed in the original ticket, rather than 'int8', 'integer 8'. 'uint8' must be 'integer unsigned 8'. etc.
Updated by Erik Fonnesbeck over 13 years ago
- Status changed from New to Feedback
- % Done changed from 90 to 100
Applied in changeset 1452fa5788f6fd0cf73d957955b8bfeeac127541.
Updated by Josh Stompro over 13 years ago
This fix/feature worked just fine with the Sun Dec 5th 07:23:23 EST 2010 nanobsd snapshot.
I added one option of each type to my lan dhcp config, and the results in the dhcpd.conf file are as follows.
option custom-lan-0 code 128 = text; option custom-lan-1 code 4 = string; option custom-lan-2 code 5 = boolean; option custom-lan-3 code 6 = unsigned integer 8; option custom-lan-4 code 7 = unsigned integer 16; option custom-lan-5 code 8 = unsigned integer 32; option custom-lan-6 code 9 = signed integer 8; option custom-lan-7 code 10 = signed integer 16; option custom-lan-8 code 11 = signed integer 32; option custom-lan-9 code 12 = ip-address; option custom-opt1-0 code 2 = text; default-lease-time 7200; max-lease-time 86400; log-facility local7; ddns-update-style none; one-lease-per-client true; deny duplicates; ping-check true; authoritative; subnet 192.168.227.0 netmask 255.255.255.192 { pool { range 192.168.227.36 192.168.227.62; } option routers 192.168.227.1; option domain-name "example.org"; option domain-search-list "example.org"; option domain-name-servers 192.168.227.1; option custom-lan-0 "VLAN-A=100;"; option custom-lan-1 "Test string"; option custom-lan-2 true; option custom-lan-3 6; option custom-lan-4 7; option custom-lan-5 8; option custom-lan-6 9; option custom-lan-7 10; option custom-lan-8 11; option custom-lan-9 192.168.1.1; }
Looks correct to me.
Josh
Updated by Ermal Luçi over 13 years ago
- Status changed from Feedback to Resolved
Thank you for testing.