patch-2.1.9 linux/net/ipv4/tcp.c

Next file: linux/net/ipv4/tcp_ipv4.c
Previous file: linux/net/ipv4/rarp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.8/linux/net/ipv4/tcp.c linux/net/ipv4/tcp.c
@@ -790,7 +790,7 @@
 	 * of the skb
 	 */
 
-	copy = min(sk->mss - tcp_size, skb->end - skb->tail);
+	copy = min(sk->mss - tcp_size, skb_tailroom(skb));
 	copy = min(copy, seglen);
 	
 	tcp_size += copy;
@@ -959,7 +959,7 @@
 			actual_win = tp->snd_wnd - (tp->snd_nxt - tp->snd_una);
 
 			if (copy > actual_win && 
-			    actual_win >= (sk->max_window >> 1))
+			    (((long) actual_win) >= (sk->max_window >> 1)))
 			{
 				copy = actual_win;
 			}
@@ -1063,7 +1063,7 @@
 			sk->write_seq += copy;
 		
 			tcp_send_skb(sk, skb);
-	
+
 			release_sock(sk);
 			lock_sock(sk);
 		}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov