Sanjiv Doshi (sandoshi)
2016-10-10 19:41:21 UTC
Folks
We are using dnsmasq with dhcp-hostsfile configured with several <hwaddr>,<ipaddr>,<hostname> tuples.
When I run my udhcpc client on an interface with a MAC address equal to <hwaddr> I get the correct <ipaddr>.
However what I want to do is to match the <hwaddr> with client identifier supplied in the DHCP discover message (using the âx option with opt being 0x3d I.e â-x 0x3d:01aabbccddeeffâ in udhcpc).
This does NOT work! Looking at the code it looks like the function that reads the dhcp-hostsfile (dhcp_read_ethers()) does not explicitly support client identifier option (sets the CONFIG_NOCLID flag). As a result find_config() function fails to do a match based on CONFIG_CLID.
So my questions are the following:
* Am I reading this correctly? If not, any suggestions on how to satisfy the above requirements?
* If yes, Is this deliberate as per DHCP standard (Sorry I have not gone through the standard in detail)?
* Specifically, would supporting CONFIG_CLID option create a security hole. Any thoughts? If yes, then shouldnât ââdhcp-hostâ option fall into the same category?
Appreciate your help!
Thanks - Sam
We are using dnsmasq with dhcp-hostsfile configured with several <hwaddr>,<ipaddr>,<hostname> tuples.
When I run my udhcpc client on an interface with a MAC address equal to <hwaddr> I get the correct <ipaddr>.
However what I want to do is to match the <hwaddr> with client identifier supplied in the DHCP discover message (using the âx option with opt being 0x3d I.e â-x 0x3d:01aabbccddeeffâ in udhcpc).
This does NOT work! Looking at the code it looks like the function that reads the dhcp-hostsfile (dhcp_read_ethers()) does not explicitly support client identifier option (sets the CONFIG_NOCLID flag). As a result find_config() function fails to do a match based on CONFIG_CLID.
So my questions are the following:
* Am I reading this correctly? If not, any suggestions on how to satisfy the above requirements?
* If yes, Is this deliberate as per DHCP standard (Sorry I have not gone through the standard in detail)?
* Specifically, would supporting CONFIG_CLID option create a security hole. Any thoughts? If yes, then shouldnât ââdhcp-hostâ option fall into the same category?
Appreciate your help!
Thanks - Sam