[RTEMS Project] #1406: Invariant dhcp transaction ID can confuse dhcp state machine.

RTEMS trac trac at rtems.org
Thu Dec 15 16:52:39 UTC 2022


#1406: Invariant dhcp transaction ID can confuse dhcp state machine.
----------------------------+----------------------------
 Reporter:  Tim Cussins     |       Owner:  Needs Funding
     Type:  defect          |      Status:  assigned
 Priority:  normal          |   Milestone:  4.9.5
Component:  network/legacy  |     Version:  4.9
 Severity:  normal          |  Resolution:
 Keywords:                  |  Blocked By:
 Blocking:                  |
----------------------------+----------------------------
Changes (by Joel Sherrill):

 * owner:  Joel Sherrill => Needs Funding


Old description:

> The dhcp code in rtems uses an unchanging transaction id (xid) in the
> dhcp discover and request packets.
>
> It is possible (and in fact has been observed) that dhcp servers may
> issue multiple OFFER packets in response to multiple REQUEST packets from
> the same device.
>
> The second OFFER packet could potentially be received while the dhcp
> state machine is waiting for an ACK packet - and this would cause the
> rtems dhcp process to fail needlessly.
>
> A solution to this is to use the transaction id field (described in the
> bootp/dhcp protocols) to match server dhcp replies with rtems dhcp
> requests.
>
> For details on the use of xid, see RFC 2131, Section 4.4.1
> (http://www.networksorcery.com/enp/rfc/rfc2131.txt)
>
> The patch creates a unique xid for each dhcp transaction: the
> DISCOVER/OFFER and REQUEST/ACK phases use different xid's, there is no
> confusion in the rtems state machine.

New description:

 The dhcp code in rtems uses an unchanging transaction id (xid) in the dhcp
 discover and request packets.

 It is possible (and in fact has been observed) that dhcp servers may issue
 multiple OFFER packets in response to multiple REQUEST packets from the
 same device.

 The second OFFER packet could potentially be received while the dhcp state
 machine is waiting for an ACK packet - and this would cause the rtems dhcp
 process to fail needlessly.

 A solution to this is to use the transaction id field (described in the
 bootp/dhcp protocols) to match server dhcp replies with rtems dhcp
 requests.

 For details on the use of xid, see RFC 2131, Section 4.4.1
 (http://www.networksorcery.com/enp/rfc/rfc2131.txt)

 The patch creates a unique xid for each dhcp transaction: the
 DISCOVER/OFFER and REQUEST/ACK phases use different xid's, there is no
 confusion in the rtems state machine.

--

Comment:

 Reassigning legacy stack issues to Needs Funding.

--
Ticket URL: <http://devel.rtems.org/ticket/1406#comment:5>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list