pktgen: bug fix in transmission headers with frags=0
authorDaniel Turull <daniel.turull@gmail.com>
Mon, 14 Mar 2011 20:47:40 +0000 (13:47 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2011 20:47:40 +0000 (13:47 -0700)
commit05aebe2e5d009314a1d9b47ad9cda59ccb57d76d
treebd448f392fbc522034f51e032f5f25bc87951a38
parent4e75db2e8ff2c97762e87f61f54d7cdeaab1a6b0
pktgen: bug fix in transmission headers with frags=0

(bug introduced by commit 26ad787962ef84677a48c560
(pktgen: speedup fragmented skbs)

The headers of pktgen were incorrectly added in a pktgen packet
without frags (frags=0). There was an offset in the pktgen headers.

The cause was in reusing the pgh variable as a return variable in skb_put
when adding the payload to the skb.

Signed-off-by: Daniel Turull <daniel.turull@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
net/core/pktgen.c