Marty Connor wrote:
Steven, do you have a patch to propose?
My coworker, Thomas Tsai, has created such a patch. Attached. Hope this helps. Steven.
/ Marty /
-- Steven Shiau <steven _at_ nchc org tw> <steven _at_ stevenshiau org> National Center for High-performance Computing, Taiwan. http://www.nchc.org.tw Public Key Server PGP Key ID: 1024D/9762755A Fingerprint: A2A1 08B7 C22C 3D06 34DB F4BC 08B3 E3D7 9762 755A
diff -Nur gpxe-1.0.0/contrib/rom-o-matic/doc/SEND_DHCP_CLIENT_ID.html gpxe/contrib/rom-o-matic/doc/SEND_DHCP_CLIENT_ID.html --- gpxe-1.0.0/contrib/rom-o-matic/doc/SEND_DHCP_CLIENT_ID.html 1970-01-01 08:00:00.000000000 +0800 +++ gpxe/contrib/rom-o-matic/doc/SEND_DHCP_CLIENT_ID.html 2010-03-22 15:00:13.000000000 +0800 @@ -0,0 +1,2 @@ +Add DHCP client identifier. +Required for Infiniband, and doesn't hurt other link layers. diff -Nur gpxe-1.0.0/contrib/rom-o-matic/flag-table.php gpxe/contrib/rom-o-matic/flag-table.php --- gpxe-1.0.0/contrib/rom-o-matic/flag-table.php 2010-03-22 14:29:31.000000000 +0800 +++ gpxe/contrib/rom-o-matic/flag-table.php 2010-03-22 14:40:15.000000000 +0800 @@ -416,6 +416,13 @@ "type" => "on/off", "value" => "on", "cfgsec" => "general" + ), + "SEND_DHCP_CLIENT_ID" + => array ( + "flag" => "SEND_DHCP_CLIENT_ID", + "type" => "on/off", + "value" => "on", + "cfgsec" => "general" ), "SANBOOT_CMD" diff -Nur gpxe-1.0.0/src/config/general.h gpxe/src/config/general.h --- gpxe-1.0.0/src/config/general.h 2010-03-22 14:29:31.000000000 +0800 +++ gpxe/src/config/general.h 2010-03-22 14:41:10.000000000 +0800 @@ -128,6 +128,11 @@ #undef ERRMSG_80211 /* All 802.11 error descriptions (~3.3kb) */ /* + * Send dhcp config about client_id + */ +#undef SEND_DHCP_CLIENT_ID /* maybe not compatible with PXE */ + +/* * Obscure configuration options * * You probably don't need to touch these. diff -Nur gpxe-1.0.0/src/net/udp/dhcp.c gpxe/src/net/udp/dhcp.c --- gpxe-1.0.0/src/net/udp/dhcp.c 2010-03-22 14:29:31.000000000 +0800 +++ gpxe/src/net/udp/dhcp.c 2010-03-22 14:54:20.000000000 +0800 @@ -25,6 +25,7 @@ #include <errno.h> #include <assert.h> #include <byteswap.h> +#include <config/general.h> #include <gpxe/if_ether.h> #include <gpxe/netdevice.h> #include <gpxe/device.h> @@ -1128,8 +1129,10 @@ /* Add DHCP client identifier. Required for Infiniband, and * doesn't hurt other link layers. */ - client_id.ll_proto = ntohs ( netdev->ll_protocol->ll_proto ); + memset( &client_id, 0, sizeof( client_id ) ); ll_addr_len = netdev->ll_protocol->ll_addr_len; +#ifdef SEND_DHCP_CLIENT_ID + client_id.ll_proto = ntohs ( netdev->ll_protocol->ll_proto ); assert ( ll_addr_len <= sizeof ( client_id.ll_addr ) ); memcpy ( client_id.ll_addr, netdev->ll_addr, ll_addr_len ); if ( ( rc = dhcppkt_store ( dhcppkt, DHCP_CLIENT_ID, &client_id, @@ -1138,7 +1141,7 @@ strerror ( rc ) ); return rc; } - +#endif /* Add client UUID, if we have one. Required for PXE. */ client_uuid.type = DHCP_CLIENT_UUID_TYPE; if ( ( len = fetch_uuid_setting ( NULL, &uuid_setting,
_______________________________________________ gPXE mailing list [email protected] http://etherboot.org/mailman/listinfo/gpxe
