From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16740 invoked by alias); 21 Mar 2011 14:50:36 -0000 Received: (qmail 16705 invoked by uid 22791); 21 Mar 2011 14:50:35 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 21 Mar 2011 14:50:28 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id E86632F80005 for ; Mon, 21 Mar 2011 14:50:25 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nrjf5-TEP-gl; Mon, 21 Mar 2011 14:50:24 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-bugs@ecos.sourceware.org Subject: [Bug 1001177] New: Redboot DHCP client race condition, XID, and retry problems. X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: RedBoot X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: grant.b.edwards@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Mon, 21 Mar 2011 14:50:00 -0000 Mailing-List: contact ecos-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-bugs-owner@sourceware.org X-SW-Source: 2011/txt/msg00662.txt.bz2 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 on the CC list for the bug.