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+;
}