aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/pktgen.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index f0aec6c39ecd..0c55eaa70e39 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2620,8 +2620,7 @@ static void pktgen_finalize_skb(struct pktgen_dev *pkt_dev, struct sk_buff *skb,
2620 datalen -= sizeof(*pgh); 2620 datalen -= sizeof(*pgh);
2621 2621
2622 if (pkt_dev->nfrags <= 0) { 2622 if (pkt_dev->nfrags <= 0) {
2623 pgh = (struct pktgen_hdr *)skb_put(skb, datalen); 2623 memset(skb_put(skb, datalen), 0, datalen);
2624 memset(pgh + 1, 0, datalen);
2625 } else { 2624 } else {
2626 int frags = pkt_dev->nfrags; 2625 int frags = pkt_dev->nfrags;
2627 int i, len; 2626 int i, len;