mirror of
https://github.com/xcat2/xcat-dep.git
synced 2024-11-21 09:01:46 +00:00
a60d90375d
-Add workaround for use of Etherboot UNDI stack from git tree -Add workaround for UNDI drivers that do not call the undi open call before attempting to use defive from git tree -Change ProxyDHCP broadcast to go to port 67 (from git tree) -Enable use of DHCP options when BOOTP fields are not present -Report UNDI device to driver as a more standard interface type -Workaround malformed OACK packets sent by certain PXE servers -Avoid a spurious IRQ -Add fix for e1000 driver -Have the UNDI stack report UNDI capabilities -Fix some places where interrupt handlers did not use iret to return
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
diff -urN gpxe-0.9.7/src/net/dhcppkt.c gpxe-0.9.7-bootptodhcpfailover/src/net/dhcppkt.c
|
|
--- gpxe-0.9.7/src/net/dhcppkt.c 2009-03-01 21:23:42.000000000 -0500
|
|
+++ gpxe-0.9.7-bootptodhcpfailover/src/net/dhcppkt.c 2009-08-21 21:49:52.000000000 -0400
|
|
@@ -155,6 +155,8 @@
|
|
memset ( field_data, 0, field->len );
|
|
memcpy ( dhcp_packet_field ( dhcppkt->dhcphdr, field ),
|
|
data, len );
|
|
+ /* Erase any equivalent option from the options block */
|
|
+ dhcpopt_store ( &dhcppkt->options, tag, NULL, 0 );
|
|
return 0;
|
|
}
|
|
|
|
@@ -181,14 +183,16 @@
|
|
void *data, size_t len ) {
|
|
struct dhcp_packet_field *field;
|
|
void *field_data;
|
|
- size_t field_len;
|
|
+ size_t field_len = 0;
|
|
|
|
- /* If this is a special field, return it */
|
|
+ /* Identify special field, if any */
|
|
if ( ( field = find_dhcp_packet_field ( tag ) ) != NULL ) {
|
|
field_data = dhcp_packet_field ( dhcppkt->dhcphdr, field );
|
|
field_len = field->used_len ( field_data, field->len );
|
|
- if ( ! field_len )
|
|
- return -ENOENT;
|
|
+ }
|
|
+
|
|
+ /* Return special field, if it exists and is populated */
|
|
+ if ( field_len ) {
|
|
if ( len > field_len )
|
|
len = field_len;
|
|
memcpy ( data, field_data, len );
|