This is the mail archive of the ecos-bugs@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1001177] New: Redboot DHCP client race condition, XID, andretry problems.


Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001177

           Summary: Redboot DHCP client race condition, XID, and retry
                    problems.
           Product: eCos
           Version: CVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: low
         Component: RedBoot
        AssignedTo: unassigned@bugs.ecos.sourceware.org
        ReportedBy: grant.b.edwards@gmail.com
                CC: ecos-bugs@ecos.sourceware.org
             Class: Advice Request


Redboot's DHCP implementation has multiple problems:

 1) Received BOOTP packets overwrite the stored configuration
    information regardless of their XID, the destination MAC address,
    the type of the packet, or the state of the DHCP FSM.

    Because of they way the state machine and packet handling is split
    between the receive packet handler and the foreground loop, this
    can result in corruption of the IP configuration and failure to
    obtian an IP address.

 2) The retry mechanism doesn't work.  The retry counter is
    decremented at an inappropriate point in the code -- resulting in
    the counter being decremented multiple times during a single DHCP
    transaction.  At one point in the transaction the retry counter
    also gets reset back to it's max value.  Between these two bugs
    there are failure cases where no retries are performed at all and
    cases where the state machine goes into an infinite loop retrying
    indefinitely.

 3) Although the DHCP spec says the XID should be chosen so as to be
    unique, the XID used is a hard-wired constant that's always the
    same -- this can result in problems if multiple devices are
    started simultaneously.

 4) The XID on received packets is not verified, and the XID sent in
    the REQUEST packet is copied from the OFFER packet regardless of
    what the original XID was in the DISCOVER packet.

I've completely re-written the BOOTP/DHCP support to fix the above
problems and an currently testing it.

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]