DHCP fixes

friesen wrote on Wednesday, October 31, 2018:

I am finding a few bugs in +TCP, or misunderstandings perhaps.

  1. For reliable receipt of the DHCP’d IP address for certain routers, dhcpMAX_OPTION_LENGTH_OF_INTEREST must be set to 0, otherwise the loop ends before using the IP
  2. Option 61 (dhcpCLIENT_IDENTIFIER_OPTION_CODE) isn’t being set correctly. Byte 1 should be set to ethernet. To implement this:
#define dhcpCLIENT_IDENTIFIER_OFFSET			( 6 )
#define dhcpREQUESTED_IP_ADDRESS_OFFSET			( 14 )
#define dhcpDHCP_SERVER_IP_ADDRESS_OFFSET		( 20 )
//in prvSendDHCPRequest and prvSendDHCPDiscover
dhcpCLIENT_IDENTIFIER_OPTION_CODE, 7, 1, 0, 0, 0, 0, 0, 0,