Skip to content

Commit

Permalink
pktgen: correct uninitialized queue_map
Browse files Browse the repository at this point in the history
This fix a bug reported by backyes.
Right the first time pktgen's using queue_map that's not been initialized
by set_cur_queue_map(pkt_dev);

Signed-off-by: Junchang Wang <junchangwang@gmail.com>
Signed-off-by: Backyes <backyes@mail.ustc.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Junchang Wang authored and David S. Miller committed Nov 8, 2010
1 parent 18543a6 commit eb58906
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -2612,8 +2612,8 @@ static struct sk_buff *fill_packet_ipv4(struct net_device *odev,
/* Update any of the values, used when we're incrementing various
* fields.
*/
queue_map = pkt_dev->cur_queue_map;
mod_cur_headers(pkt_dev);
queue_map = pkt_dev->cur_queue_map;

datalen = (odev->hard_header_len + 16) & ~0xf;

Expand Down Expand Up @@ -2976,8 +2976,8 @@ static struct sk_buff *fill_packet_ipv6(struct net_device *odev,
/* Update any of the values, used when we're incrementing various
* fields.
*/
queue_map = pkt_dev->cur_queue_map;
mod_cur_headers(pkt_dev);
queue_map = pkt_dev->cur_queue_map;

skb = __netdev_alloc_skb(odev,
pkt_dev->cur_pkt_size + 64
Expand Down

0 comments on commit eb58906

Please sign in to comment.