mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
fixed bug #40303 DHCP xid renewed when sending a DHCPREQUEST
This commit is contained in:
parent
d9d0c52770
commit
c82f04f54c
@ -96,6 +96,9 @@ HISTORY
|
||||
|
||||
++ Bugfixes:
|
||||
|
||||
2014-02-27: Simon Goldschmidt
|
||||
* dhcp.c: fixed bug #40303 DHCP xid renewed when sending a DHCPREQUEST
|
||||
|
||||
2014-02-27: Simon Goldschmidt
|
||||
* raw.c: fixed bug #41680 raw socket can not receive IPv6 packet when
|
||||
IP_SOF_BROADCAST_RECV==1
|
||||
|
@ -1671,15 +1671,18 @@ dhcp_create_msg(struct netif *netif, struct dhcp *dhcp, u8_t message_type)
|
||||
LWIP_ASSERT("dhcp_create_msg: check that first pbuf can hold struct dhcp_msg",
|
||||
(dhcp->p_out->len >= sizeof(struct dhcp_msg)));
|
||||
|
||||
/* reuse transaction identifier in retransmissions */
|
||||
if (dhcp->tries == 0) {
|
||||
/* DHCP_REQUEST should reuse 'xid' from DHCPOFFER */
|
||||
if (message_type != DHCP_REQUEST) {
|
||||
/* reuse transaction identifier in retransmissions */
|
||||
if (dhcp->tries == 0) {
|
||||
#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND)
|
||||
xid = LWIP_RAND();
|
||||
xid = LWIP_RAND();
|
||||
#else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
|
||||
xid++;
|
||||
xid++;
|
||||
#endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
|
||||
}
|
||||
dhcp->xid = xid;
|
||||
}
|
||||
dhcp->xid = xid;
|
||||
LWIP_DEBUGF(DHCP_DEBUG | LWIP_DBG_TRACE,
|
||||
("transaction id xid(%"X32_F")\n", xid));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user