From: Rick Jones <rick.jones2@hp.com>
To: Thomas Graf <tgraf@suug.ch>
Cc: Stephen Hemminger <shemminger@vyatta.com>,
Dave Jones <davej@codemonkey.org.uk>,
netdev@vger.kernel.org
Subject: Re: Fwd: [Bug 447812] New: Netlink messages from "tc" to sch_netem module are not interpreted correctly
Date: Thu, 22 May 2008 09:32:14 -0700 [thread overview]
Message-ID: <4835A00E.2050908@hp.com> (raw)
In-Reply-To: <20080522111835.GQ20815@postel.suug.ch>
> I looked at netrt_rtnetlink.c, the problem is unrelated. Look at
> the code when adding the source attribtue:
>
> struct rtattr *rtap;
>
> if (source) {
> rtap += rtap->rta_len;
>
> You want to increment rtap by rta_len bytes, not rta_len*sizeof(*rtap)
> bytes.
>
> Also, the code uses RTA_LENGTH() to calculate attributes sizes which
> is wrong, it must use RTA_SPACE() as RTA_LENGTH() does not align the
> actual data part and thus the next attribute is unaligned if the data
> of the previous attribute is not aligned to 4 bytes.
I'll make the fixes in the netperf code - thanks, hope the bugs there
weren't too big a distraction.
rick jones
next prev parent reply other threads:[~2008-05-22 16:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 21:45 Fwd: [Bug 447812] New: Netlink messages from "tc" to sch_netem module are not interpreted correctly Dave Jones
2008-05-21 22:10 ` Stephen Hemminger
2008-05-22 0:21 ` Thomas Graf
2008-05-22 0:57 ` Rick Jones
2008-05-22 11:18 ` Thomas Graf
2008-05-22 16:32 ` Rick Jones [this message]
2008-05-22 11:37 ` [NETLINK]: Fix nla_parse_nested_compat() to call nla_parse() directly Thomas Graf
2008-05-22 12:45 ` Patrick McHardy
2008-05-22 17:49 ` David Miller
2008-05-22 18:02 ` Stephen Hemminger
2008-05-22 18:11 ` David Miller
2008-05-21 22:16 ` Fwd: [Bug 447812] New: Netlink messages from "tc" to sch_netem module are not interpreted correctly Rick Jones
2008-05-21 22:36 ` Rick Jones
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=4835A00E.2050908@hp.com \
--to=rick.jones2@hp.com \
--cc=davej@codemonkey.org.uk \
--cc=netdev@vger.kernel.org \
--cc=shemminger@vyatta.com \
--cc=tgraf@suug.ch \
/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 NNTP newsgroup(s).