apps/netutils/dhcpc/dhcpc.c: Fix an error for DHCP REQUEST receiving a NAK.In DHCP Request operation, no need to update ciaddr to the client address and keep it as 0.

This commit is contained in:
Kevin Liu 2019-01-30 07:49:37 -06:00 committed by Gregory Nutt
parent 2973c48ca0
commit 721bb64e52

View File

@ -246,7 +246,6 @@ static int dhcpc_sendmsg(FAR struct dhcpc_state_s *pdhcpc,
*/
pdhcpc->packet.flags = HTONS(BOOTP_BROADCAST); /* Broadcast bit. */
memcpy(pdhcpc->packet.ciaddr, &pdhcpc->ipaddr.s_addr, 4);
pend = dhcpc_addserverid(&pdhcpc->serverid, pend);
pend = dhcpc_addreqipaddr(&pdhcpc->ipaddr, pend);
break;