Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: oldheating gps motorhome heating
Revision 180:0a30cff6b36a, committed 2020-12-31
- Comitter:
- andrewboyson
- Date:
- Thu Dec 31 12:32:51 2020 +0000
- Parent:
- 179:55342264fca1
- Child:
- 181:169881ecd52f
- Commit message:
- Fixed DHCP problem with not providing the offered IP in the request resulting in a NAQ.
Changed in this revision
| udp/dhcp/dhcp.c | Show annotated file Show diff for this revision Revisions of this file |
--- a/udp/dhcp/dhcp.c Wed Dec 30 19:26:19 2020 +0000
+++ b/udp/dhcp/dhcp.c Thu Dec 31 12:32:51 2020 +0000
@@ -273,11 +273,12 @@
{
case DHCPOFFER:
if (DhcpTrace) { LogTime("DHCP <- offer ip "); Ip4AddressLog(yiaddr); Log("\r\n"); }
+ DhcpLocalIp = yiaddr; //Save the offered ip - should really be in another variable as we have not had the ACK yet from our request but hey ho.
*pSizeTx = sendRequest(pPacketTx, DHCPREQUEST, siaddr, yiaddr);
return BROADCAST;
case DHCPACK:
if (DhcpTrace) { LogTime("DHCP <- ack ip "); Ip4AddressLog(yiaddr); Log("\r\n"); }
- DhcpLocalIp = yiaddr;
+ DhcpLocalIp = yiaddr; //Save our IP
elapsedLifeMsTimer = MsTimerCount; //Start the life timer
delayMs = MIN_REPEAT_DELAY_TIME_MS; //Set the delay time back to minimum
break;