From: Thomas Graf <tgraf@suug.ch>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Simon Horman <horms@verge.net.au>
Subject: Re: [PATCH net-next] pktgen: Fix position of ip and udp header
Date: Mon, 3 Jun 2013 22:24:27 +0100 [thread overview]
Message-ID: <20130603212427.GA14411@casper.infradead.org> (raw)
In-Reply-To: <10b1d385b151b94946b77183c34e34a07945983c.1370293920.git.tgraf@suug.ch>
On 06/03/13 at 11:18pm, Thomas Graf wrote:
> skb_set_network_header() expects an offset based on the data pointer
> whereas skb_tail_offset() also includes the headroom. This resulted
> in the ip header being written in a wrong location.
>
> Use return values of skb_put() directly and rely on skb->len to
> set mac, network, and transport header.
>
> Cc: Simon Horman <horms@verge.net.au>
> Assisted-by: Daniel Borkmann <dborkmann@redhat.com>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
FYI: ipmr and netpoll may be affected as well, the code as-is
is only correct if skb->head = skb->data. Will check those
later if nobody beats me to it.
prev parent reply other threads:[~2013-06-03 21:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 21:18 [PATCH net-next] pktgen: Fix position of ip and udp header Thomas Graf
2013-06-03 21:24 ` Thomas Graf [this message]
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=20130603212427.GA14411@casper.infradead.org \
--to=tgraf@suug.ch \
--cc=davem@davemloft.net \
--cc=horms@verge.net.au \
--cc=netdev@vger.kernel.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 NNTP newsgroup(s).