# HG changeset patch # User gthomas # Date 1058295229 0 # Node ID c461c509e6efe8ce59cd64d6b83e1c3f0fbf5bf6 # Parent f886ab6517f0a3c7aa36ec293b0f9b40636f279b Fix BOOTP/DHCP diff --git a/packages/redboot/current/ChangeLog b/packages/redboot/current/ChangeLog --- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,5 +1,10 @@ 2003-07-15 Gary Thomas + * src/net/bootp.c: Use correct options for DHCP discover. This has + the added bonus that when BOOTP & GATEWAY options are enabled, then + RedBoot can get it's address via normal DHCP. Of course, DHCP leases + will be ignored by RedBoot, so some caution is warranted. + * include/net/net.h: * src/net/arp.c (__arp_request): Allow ARP of self - used during initialization to "broadcast" that an IP address is in use. diff --git a/packages/redboot/current/src/net/bootp.c b/packages/redboot/current/src/net/bootp.c --- a/packages/redboot/current/src/net/bootp.c +++ b/packages/redboot/current/src/net/bootp.c @@ -70,7 +70,7 @@ static bootp_header_t *bp_info; #ifdef CYGSEM_REDBOOT_NETWORKING_USE_GATEWAY static const unsigned char dhcpCookie[] = {99,130,83,99}; static const unsigned char dhcpEndOption[] = {255}; -static const unsigned char dhcpRequestOption[] = {53,1,3}; +static const unsigned char dhcpDiscoverOption[] = {53,1,1}; #endif static void @@ -169,7 +169,7 @@ int p = b.bp_vend; AddOption(p,dhcpCookie); - AddOption(p,dhcpRequestOption); + AddOption(p,dhcpDiscoverOption); AddOption(p,dhcpEndOption); // Some servers insist on a minimum amount of "vendor" data