From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5189 invoked by alias); 10 Mar 2011 10:26:45 -0000 Received: (qmail 5177 invoked by uid 22791); 10 Mar 2011 10:26:44 -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; Thu, 10 Mar 2011 10:26:40 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id 4C9762F80003 for ; Thu, 10 Mar 2011 10:26:38 +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 7Jkrv-CQ0Fw7; Thu, 10 Mar 2011 10:26:36 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001170] Correct Endianness of DHCP "Seconds Elapsed" field X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sergei.gavrikov@gmail.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: unassigned@bugs.ecos.sourceware.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: In-Reply-To: References: X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Thu, 10 Mar 2011 10:26:00 -0000 Message-Id: <20110310102636.BECD02F78007@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: 2011-03/txt/msg00013.txt.bz2 Please do not reply to this email. Use the web interface provided at: http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001170 --- Comment #4 from Sergei Gavrikov 2011-03-10 10:26:33 GMT --- (In reply to comment #3) > (In reply to comment #2) > > It also appears in bootp_support.c: show_bootp(). It seems for me we also should fix==ntohs and 'flags' value there, as broadcast value shows itself as 0x80 in DHCP dump (on i386 target): BOOTP[eth0] op: REQUEST htype: Ethernet hlen: 6 hops: 0 xid: 0x14893456 secs: 0 flags: 0x80 ^^^^ What do you think? I mean --- a/packages/net/common/current/src/bootp_support.c +++ b/packages/net/common/current/src/bootp_support.c @@ -274,8 +274,8 @@ show_bootp(const char *intf, struct boot diag_printf(" hlen: %d\n", bp->bp_hlen ); diag_printf(" hops: %d\n", bp->bp_hops ); diag_printf(" xid: 0x%x\n", bp->bp_xid ); - diag_printf(" secs: %d\n", bp->bp_secs ); - diag_printf(" flags: 0x%x\n", bp->bp_flags ); + diag_printf(" secs: %d\n", ntohs(bp->bp_secs) ); + diag_printf(" flags: 0x%x\n", ntohs(bp->bp_flags) ); > > Depending on the implementation of htons(), cyg_current_time() may > > end up getting called twice. Might be better to put the result of > > cyg_current_time() / 100 in a temporary variable and perform htons() > > on that. > > > > Jay > > Agreed. Thank you for your point. I will re-submit new patch. Or may > be Kelvin has own one? Well, I can attach a combined patch for the both sources, however, unfortunately, I cannot test it on BE target. -- 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.