]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv4/tcp_output.c
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[linux-2.6-omap-h63xx.git] / net / ipv4 / tcp_output.c
index d6e3d269e90611250fabaea9005d0dc3abc3dea3..7114031fdc70e3ce8c6adcdd7beda2f6d2b5d049 100644 (file)
@@ -190,7 +190,7 @@ void tcp_select_initial_window(int __space, __u32 mss,
        }
 
        /* Set initial window to value enough for senders,
-        * following RFC1414. Senders, not following this RFC,
+        * following RFC2414. Senders, not following this RFC,
         * will be satisfied with 2.
         */
        if (mss > (1<<*rcv_wscale)) {
@@ -435,7 +435,16 @@ int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss
        int nsize, old_factor;
        u16 flags;
 
-       BUG_ON(len >= skb->len);
+       if (unlikely(len >= skb->len)) {
+               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;
+       }
 
        nsize = skb_headlen(skb) - len;
        if (nsize < 0)
@@ -1610,7 +1619,7 @@ void tcp_send_fin(struct sock *sk)
  * was unread data in the receive queue.  This behavior is recommended
  * by draft-ietf-tcpimpl-prob-03.txt section 3.10.  -DaveM
  */
-void tcp_send_active_reset(struct sock *sk, unsigned int __nocast priority)
+void tcp_send_active_reset(struct sock *sk, gfp_t priority)
 {
        struct tcp_sock *tp = tcp_sk(sk);
        struct sk_buff *skb;