]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/net/tcp.h
[IrDA]: Netlink layer.
[linux-2.6-omap-h63xx.git] / include / net / tcp.h
index ef8f9d4dae8501459ce9a9f4fb38dff5407d3945..a8af9ae0017719bb7071ef5b34faa2c3f751a7b3 100644 (file)
@@ -254,6 +254,12 @@ static inline int between(__u32 seq1, __u32 seq2, __u32 seq3)
        return seq3 - seq2 >= seq1 - seq2;
 }
 
+static inline int tcp_too_many_orphans(struct sock *sk, int num)
+{
+       return (num > sysctl_tcp_max_orphans) ||
+               (sk->sk_wmem_queued > SOCK_MIN_SNDBUF &&
+                atomic_read(&tcp_memory_allocated) > sysctl_tcp_mem[2]);
+}
 
 extern struct proto tcp_prot;
 
@@ -736,7 +742,8 @@ static inline __u32 tcp_current_ssthresh(const struct sock *sk)
 
 static inline void tcp_sync_left_out(struct tcp_sock *tp)
 {
-       BUG_ON(tp->sacked_out + tp->lost_out > tp->packets_out);
+       BUG_ON(tp->rx_opt.sack_ok &&
+              (tp->sacked_out + tp->lost_out > tp->packets_out));
        tp->left_out = tp->sacked_out + tp->lost_out;
 }