From: bugzilla-daemon@bugs.ecos.sourceware.org
To: ecos-patches@ecos.sourceware.org
Subject: [Bug 1001170] Correct Endianness of DHCP "Seconds Elapsed" field
Date: Thu, 10 Mar 2011 10:26:00 -0000 [thread overview]
Message-ID: <20110310102636.BECD02F78007@mail.ecoscentric.com> (raw)
In-Reply-To: <bug-1001170-104@http.bugs.ecos.sourceware.org/>
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 <sergei.gavrikov@gmail.com> 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.
next prev parent reply other threads:[~2011-03-10 10:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-09 11:45 [Bug 1001170] New: " bugzilla-daemon
2011-03-09 18:26 ` [Bug 1001170] " bugzilla-daemon
2011-03-09 23:59 ` Jay Foster
2011-03-10 5:38 ` bugzilla-daemon
2011-03-10 10:26 ` bugzilla-daemon [this message]
2011-03-10 13:30 ` bugzilla-daemon
2011-03-11 17:36 ` bugzilla-daemon
2011-03-11 18:25 ` bugzilla-daemon
2011-03-11 20:08 ` bugzilla-daemon
2011-03-12 7:07 ` bugzilla-daemon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110310102636.BECD02F78007@mail.ecoscentric.com \
--to=bugzilla-daemon@bugs.ecos.sourceware.org \
--cc=ecos-patches@ecos.sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).