net: netem: correct the parent's backlog when corrupted packet was dropped
[ Upstream commit e0ad032e144731a5928f2d75e91c2064ba1a764c ] 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: 6071bd1aa13e ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e0f8a42943
commit
b630744138
@ -603,6 +603,8 @@ finish_segs:
|
||||
}
|
||||
/* Parent qdiscs accounted for 1 skb of size @prev_len */
|
||||
qdisc_tree_reduce_backlog(sch, -(nb - 1), -(len - prev_len));
|
||||
} else if (!skb) {
|
||||
return NET_XMIT_DROP;
|
||||
}
|
||||
return NET_XMIT_SUCCESS;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user