From: Eric O. <eob...@us...> - 2009-01-31 13:19:46
|
Update of /cvsroot/ipcop/ipcop/html/cgi-bin In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv25376/html/cgi-bin Modified Files: Tag: IPCOP_v1_4_0 dhcp.cgi Log Message: Fix for dhcp-client-identifier which requires a 0 (zero) prefix when the value field contains an identifier other than a hardware address (e.g. a fully qualified domain name). Index: dhcp.cgi =================================================================== RCS file: /cvsroot/ipcop/ipcop/html/cgi-bin/dhcp.cgi,v retrieving revision 1.14.2.102 retrieving revision 1.14.2.103 diff -C2 -d -r1.14.2.102 -r1.14.2.103 *** dhcp.cgi 25 Jan 2009 17:06:29 -0000 1.14.2.102 --- dhcp.cgi 31 Jan 2009 13:19:41 -0000 1.14.2.103 *************** *** 1354,1357 **** --- 1354,1362 ---- print FILE "{\n"; print FILE "\thardware ethernet $FIX_MAC;\n" if ($FIX_MAC); + # dhcp-client-identifier requires an octal 0 (zero) prefix to a hostname + # or a FQDN. Refer http://tools.ietf.org/html/rfc2132#section-9.14 + if ( ($FIX_HOSTNAME) && !($FIX_MAC) ) { + print FILE "\toption dhcp-client-identifier \"\\000$FIX_HOSTNAME\";\n" ; + } print FILE "\tfixed-address $FIX_ADDR;\n"; print FILE "\tnext-server $FIX_NEXTADDR;\n" if ($FIX_NEXTADDR); *************** *** 1360,1364 **** $FIX_ROOTPATH =~ s/,/,/g; print FILE "\toption root-path \"$FIX_ROOTPATH\";\n" if ($FIX_ROOTPATH); ! if ($FIX_HOSTNAME) { my ($opt_host, $opt_dom) = split (/\./, $FIX_HOSTNAME, 2); print FILE "\toption host-name \"$opt_host\";\n" ; --- 1365,1369 ---- $FIX_ROOTPATH =~ s/,/,/g; print FILE "\toption root-path \"$FIX_ROOTPATH\";\n" if ($FIX_ROOTPATH); ! if ( ($FIX_HOSTNAME) && ($FIX_MAC) ) { my ($opt_host, $opt_dom) = split (/\./, $FIX_HOSTNAME, 2); print FILE "\toption host-name \"$opt_host\";\n" ; |