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: NDaniel Borkmann <dborkmann@redhat.com> Signed-off-by: NThomas Graf <tgraf@suug.ch> Acked-by: NDaniel Borkmann <dborkmann@redhat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录