net: drop the packet when fails to do software segmentation or header check

Commit cecda693a9 ("net: keep original skb
which only needs header checking during software GSO") keeps the original
skb for packets that only needs header check, but it doesn't drop the
packet if software segmentation or header check were failed.

Fixes cecda693a9 ("net: keep original skb which only needs header checking during software GSO")
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jason Wang 2014-12-19 11:09:13 +08:00 committed by David S. Miller
parent 2dc49d1680
commit af6dabc9c7
1 changed files with 1 additions and 1 deletions

View File

@ -2673,7 +2673,7 @@ static struct sk_buff *validate_xmit_skb(struct sk_buff *skb, struct net_device
segs = skb_gso_segment(skb, features);
if (IS_ERR(segs)) {
segs = NULL;
goto out_kfree_skb;
} else if (segs) {
consume_skb(skb);
skb = segs;