[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #40303] DHCP xid renewed when sending a DHCPREQUEST
From: |
Florent Matignon |
Subject: |
[lwip-devel] [bug #40303] DHCP xid renewed when sending a DHCPREQUEST |
Date: |
Fri, 18 Oct 2013 14:48:55 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 |
URL:
<http://savannah.nongnu.org/bugs/?40303>
Summary: DHCP xid renewed when sending a DHCPREQUEST
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: fmatignon
Submitted on: ven. 18 oct. 2013 16:48:54 CEST
Category: DHCP
Severity: 3 - Normal
Item Group: Faulty Behaviour
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release:
lwIP version: git head
_______________________________________________________
Details:
lwIP always renews the 'xid' field of a DHCP packet when sending a new packet:
see dhcp_create_msg() (dhcp.c line 1675)
if (dhcp->tries == 0) {
#if DHCP_CREATE_RAND_XID && defined(LWIP_RAND)
xid = LWIP_RAND();
#else /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
xid++;
#endif /* DHCP_CREATE_RAND_XID && defined(LWIP_RAND) */
}
dhcp->xid = xid;
(...)
dhcp->msg_out->xid = htonl(dhcp->xid);
This is not compliant with the RFC 2131:
"The DHCPREQUEST message contains the same 'xid' as the DHCPOFFER message."
(RFC 2131, section 4.4.1 "Initialization and allocation of network address")
The RFC does not explicitely indicates if a new xid must be regenerated when a
DHCPREQUEST is sent from BOUND, RENEWING or REBINDING states; my guess would
be that a xid is specific to a given DHCP "session" and should not be
generated in those cases.
I've actually never seen a DHCP server checking that the DHCPREQUEST xid
matches the DHCPOFFER's one... But it's just to be compliant with the RFC.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?40303>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #40303] DHCP xid renewed when sending a DHCPREQUEST,
Florent Matignon <=