net: Convert printks to pr_<level>
[linux-2.6-block.git] / net / ipv4 / tcp_input.c
index ee42d42b2f45ed9164857b6ce89d3cadb510a7d9..23ca3663d1e88bd63ed9f9de3bdbb91aa44a943f 100644 (file)
@@ -1585,6 +1585,10 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb,
                }
        }
 
+       /* tcp_sacktag_one() won't SACK-tag ranges below snd_una */
+       if (!after(TCP_SKB_CB(skb)->seq + len, tp->snd_una))
+               goto fallback;
+
        if (!skb_shift(prev, skb, len))
                goto fallback;
        if (!tcp_shifted_skb(sk, skb, state, pcount, len, mss, dup_sack))
@@ -2569,6 +2573,7 @@ static void tcp_mark_head_lost(struct sock *sk, int packets, int mark_head)
 
                if (cnt > packets) {
                        if ((tcp_is_sack(tp) && !tcp_is_fack(tp)) ||
+                           (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED) ||
                            (oldcnt >= packets))
                                break;
 
@@ -3862,9 +3867,9 @@ void tcp_parse_options(const struct sk_buff *skb, struct tcp_options_received *o
                                        opt_rx->wscale_ok = 1;
                                        if (snd_wscale > 14) {
                                                if (net_ratelimit())
-                                                       printk(KERN_INFO "tcp_parse_options: Illegal window "
-                                                              "scaling value %d >14 received.\n",
-                                                              snd_wscale);
+                                                       pr_info("%s: Illegal window scaling value %d >14 received\n",
+                                                               __func__,
+                                                               snd_wscale);
                                                snd_wscale = 14;
                                        }
                                        opt_rx->snd_wscale = snd_wscale;
@@ -4186,7 +4191,7 @@ static void tcp_fin(struct sock *sk)
                /* Only TCP_LISTEN and TCP_CLOSE are left, in these
                 * cases we should never reach this piece of code.
                 */
-               printk(KERN_ERR "%s: Impossible, sk->sk_state=%d\n",
+               pr_err("%s: Impossible, sk->sk_state=%d\n",
                       __func__, sk->sk_state);
                break;
        }