mirror of
https://github.com/torvalds/linux.git
synced 2025-11-05 11:10:22 +02:00
net: netem: correct the parent's backlog when corrupted packet was dropped
If packet corruption failed we jump to finish_segs and return
NET_XMIT_SUCCESS. Seeing success will make the parent qdisc
increment its backlog, that's incorrect - we need to return
NET_XMIT_DROP.
Fixes: 6071bd1aa1 ("netem: Segment GSO packets on enqueue")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a7fa12d158
commit
e0ad032e14
1 changed files with 2 additions and 0 deletions
|
|
@ -616,6 +616,8 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch,
|
||||||
}
|
}
|
||||||
/* Parent qdiscs accounted for 1 skb of size @prev_len */
|
/* Parent qdiscs accounted for 1 skb of size @prev_len */
|
||||||
qdisc_tree_reduce_backlog(sch, -(nb - 1), -(len - prev_len));
|
qdisc_tree_reduce_backlog(sch, -(nb - 1), -(len - prev_len));
|
||||||
|
} else if (!skb) {
|
||||||
|
return NET_XMIT_DROP;
|
||||||
}
|
}
|
||||||
return NET_XMIT_SUCCESS;
|
return NET_XMIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue