From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19251 invoked by alias); 26 Jul 2012 09:22:11 -0000 Received: (qmail 19241 invoked by uid 22791); 26 Jul 2012 09:22:10 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,MIME_QP_LONG_LINE 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; Thu, 26 Jul 2012 09:21:56 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 672C82FB0832 for ; Thu, 26 Jul 2012 10:21:55 +0100 (BST) 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 L2NGZxyi45jb; Thu, 26 Jul 2012 10:21:52 +0100 (BST) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@sourceware.org Subject: Patch_or_Contribution granted: [Bug 1001633] DHCP Client may hang X-Bugzilla-Type: request In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Date: Thu, 26 Jul 2012 09:22:00 -0000 Message-Id: <20120726092152.1C7072F7800E@mail.ecoscentric.com> Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2012-07/txt/msg00026.txt.bz2 Bernd Edlinger has granted Patch_or_Contributio= n: Bug 1001633: DHCP Client may hang http://bugs.ecos.sourceware.org/show_bug.cgi?id=3D1001633 ------- Additional Comments from Bernd Edlinger when a DHCP Response is received it should contain a time slice value. however if the time slice value is zero, the device enters an endless loop. Hence, this configuration error in the DHCP server crashes the devices. Reproduce: install tftpd32 on an own subnet, and configure the dhcp server to use zero-length time slices. The time slice value is not checked by the dhcp server, and just used as is. When the eCos DHCP Client is booted, it gets an address assigned, and freez= es immediately, for instance no ping or arp responses are sent. Additionally, the code that sends new dhcp requests uses a wrong formula for bp_secs: bp_secs =3D cyg_current_time() / 100; But that is only correct for 100 Ticks/second. bp_secs =3D cyg_current_time() / ((1000000000LL*CYGNUM_HAL_RTC_DENOMINATOR)/CYGNUM_HAL_RTC_NUMERATOR); Howto Fix: Attached you will find a patch for the file "ecos/packages/net/common/current/src/dhcp_prot.c" which checks for zero timeout and silently changes this to 1 second timeout.