aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp_output.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/tcp_output.c')
-rw-r--r--net/ipv4/tcp_output.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index 8225e425725..f37a50e55b6 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -435,7 +435,14 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
435 int nsize, old_factor; 435 int nsize, old_factor;
436 u16 flags; 436 u16 flags;
437 437
438 BUG_ON(len >= skb->len); 438 if (unlikely(len >= skb->len)) {
439 printk(KERN_DEBUG "TCP: seg_size=%u, mss=%u, seq=%u, "
440 "end_seq=%u, skb->len=%u.\n", len, mss_now,
441 TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq,
442 skb->len);
443 WARN_ON(1);
444 return 0;
445 }
439 446
440 nsize = skb_headlen(skb) - len; 447 nsize = skb_headlen(skb) - len;
441 if (nsize < 0) 448 if (nsize < 0)