aboutsummaryrefslogtreecommitdiff
path: root/net/ipv4
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-10-13 14:42:24 -0700
committerDavid S. Miller <davem@davemloft.net>2005-10-13 14:42:24 -0700
commit046d20b73960b7a2474b6d5e920d54c3fd7c23fe (patch)
tree13d06fa7a11554585f6796f6c34d03f4c522365e /net/ipv4
parenteb0d6041143fae63410c5622fef96862e6b20933 (diff)
[TCP]: Ratelimit debugging warning.
Better safe than sorry. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/tcp_output.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c
index f37a50e55b6..7114031fdc7 100644
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -436,11 +436,13 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
u16 flags;
if (unlikely(len >= skb->len)) {
- printk(KERN_DEBUG "TCP: seg_size=%u, mss=%u, seq=%u, "
- "end_seq=%u, skb->len=%u.\n", len, mss_now,
- TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq,
- skb->len);
- WARN_ON(1);
+ if (net_ratelimit()) {
+ printk(KERN_DEBUG "TCP: seg_size=%u, mss=%u, seq=%u, "
+ "end_seq=%u, skb->len=%u.\n", len, mss_now,
+ TCP_SKB_CB(skb)->seq, TCP_SKB_CB(skb)->end_seq,
+ skb->len);
+ WARN_ON(1);
+ }
return 0;
}