Bug #418
closedoption host-name for static dhcp mappings
0%
Description
Hi,
I was using 1.2.3-RC1 and wanted the client hostname to be provided by the dchp-server as given in a static dhcp-mapping. By Wireshark I could see that the dhcp offser message did not include host-name (option 12) even if requested in the dhcp discover message.
The problem is that the
/var/dhcpd/etc/dhcpd.conf
does not include the
option host-name "<host_name>";
in an host-declaration
host <name> {
...
};
I got it to work by modifying /etc/inc/services.inc as in the diff below.
I tried 1.2.3-RELEASE but it did also not work.
I have not tried 2.0 BETA.
Thank you for an otherwise excellent software.
-------------------
--- services.inc 2010-03-10 23:30:18.000000000 0100
++ services.inc2 2010-03-10 23:30:33.000000000 +0100@ -298,6 +298,8
@
if ($sm['ipaddr'])
$dhcpdconf .= " fixed-address {$sm['ipaddr']};\n";
+ if ($sm['hostname']) $dhcpdconf .= " option host-name {$sm['hostname']};\n";
$dhcpdconf .= "}\n";
$i+;
}
Updated by Chris Buechler almost 15 years ago
- Priority changed from Normal to Low
- Target version changed from 1.2.3 to 2.0
- Estimated time deleted (
0.10 h) - Affected Version set to 1.2.3
Updated by Ermal Luçi almost 15 years ago
- Status changed from New to Feedback
2.0 already has this afaik.