Skip to content
Commit 525cebed authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller
Browse files

pktgen: Fix position of ip and udp header



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>
Cc: Daniel Borkmann <dborkmann@redhat.com>
Assisted-by: default avatarDaniel Borkmann <dborkmann@redhat.com>
Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Acked-by: default avatarDaniel Borkmann <dborkmann@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 10e179e3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment