|
@@ -408,10 +408,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
|
|
if (q->corrupt && q->corrupt >= get_crandom(&q->corrupt_cor)) {
|
|
if (q->corrupt && q->corrupt >= get_crandom(&q->corrupt_cor)) {
|
|
if (!(skb = skb_unshare(skb, GFP_ATOMIC)) ||
|
|
if (!(skb = skb_unshare(skb, GFP_ATOMIC)) ||
|
|
(skb->ip_summed == CHECKSUM_PARTIAL &&
|
|
(skb->ip_summed == CHECKSUM_PARTIAL &&
|
|
- skb_checksum_help(skb))) {
|
|
|
|
- sch->qstats.drops++;
|
|
|
|
- return NET_XMIT_DROP;
|
|
|
|
- }
|
|
|
|
|
|
+ skb_checksum_help(skb)))
|
|
|
|
+ return qdisc_drop(skb, sch);
|
|
|
|
|
|
skb->data[net_random() % skb_headlen(skb)] ^= 1<<(net_random() % 8);
|
|
skb->data[net_random() % skb_headlen(skb)] ^= 1<<(net_random() % 8);
|
|
}
|
|
}
|