[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20130603212427.GA14411@casper.infradead.org>
Date: Mon, 3 Jun 2013 22:24:27 +0100
From: Thomas Graf <tgraf@...g.ch>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, Simon Horman <horms@...ge.net.au>
Subject: Re: [PATCH net-next] pktgen: Fix position of ip and udp header
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@...ge.net.au>
> Assisted-by: Daniel Borkmann <dborkmann@...hat.com>
> Signed-off-by: Thomas Graf <tgraf@...g.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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists