Index: oldkernel/linux/include/net/tcp.h
diff -u linux/include/net/tcp.h:1.1.1.1 linux/include/net/tcp.h:1.2
--- linux/include/net/tcp.h:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/include/net/tcp.h	Thu Jun  1 15:44:00 2000
@@ -777,10 +777,16 @@
 	return tp->packets_out - tp->fackets_out + tp->retrans_out;
 }
 
+/* Is SKB at the tail of the write queue? */
+static __inline__ int tcp_skb_is_last(struct sock *sk, struct sk_buff *skb)
+{
+	return (skb->next == (struct sk_buff*)&sk->write_queue);
+}
+
 /* This checks if the data bearing packet SKB (usually tp->send_head)
  * should be put on the wire right now.
  */
-static __inline__ int tcp_snd_test(struct sock *sk, struct sk_buff *skb)
+static __inline__ int tcp_snd_test(struct sock *sk, struct sk_buff *skb, int tail)
 {
 	struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
 	int nagle_check = 1;
@@ -796,20 +802,26 @@
 	 *	c) We are retransmiting [Nagle]
 	 *	d) We have too many packets 'in flight'
 	 *
-	 * 	Don't use the nagle rule for urgent data (or
-	 *	for the final FIN -DaveM).
+	 * 	FIN overrides nagle, even for the TCP_CORK
+	 *	case. -DaveM
+	 *
+	 *	Also, Nagle rule does not apply to frames, which
+	 *	sit in the middle of queue (they have no chances
+	 *	to get new data) and if room at tail of skb is
+	 *	not enough to save something seriously (<32 for now).
 	 */
-	if ((sk->nonagle == 2 && (skb->len < tp->mss_cache)) ||
-	    (!sk->nonagle &&
-	     skb->len < (tp->mss_cache >> 1) &&
-	     tp->packets_out &&
-	     !(TCP_SKB_CB(skb)->flags & (TCPCB_FLAG_URG|TCPCB_FLAG_FIN))))
-		nagle_check = 0;
+	if (!(TCP_SKB_CB(skb)->flags & (TCPCB_FLAG_URG|TCPCB_FLAG_FIN))) {
+		if ((sk->nonagle == 2 && (skb->len < tp->mss_cache)) ||
+		    (!sk->nonagle &&
+		     skb->len < (tp->mss_cache >> 1) &&
+		     tp->packets_out))
+			nagle_check = 0;
+	}
 
 	/* Don't be strict about the congestion window for the
 	 * final FIN frame.  -DaveM
 	 */
-	return (nagle_check &&
+	return ((!tail || nagle_check || skb_tailroom(skb) < 32) &&
 		((tcp_packets_in_flight(tp) < tp->snd_cwnd) ||
 		 (TCP_SKB_CB(skb)->flags & TCPCB_FLAG_FIN)) &&
 		!after(TCP_SKB_CB(skb)->end_seq, tp->snd_una + tp->snd_wnd) &&
@@ -822,8 +834,10 @@
  */
 static __inline__ void tcp_push_pending_frames(struct sock *sk, struct tcp_opt *tp)
 {
-	if(tp->send_head) {
-		if(tcp_snd_test(sk, tp->send_head))
+	struct sk_buff *skb = tp->send_head;
+
+	if(skb) {
+		if(tcp_snd_test(sk, skb, tcp_skb_is_last(sk, skb)))
 			tcp_write_xmit(sk);
 		else if(tp->packets_out == 0 && !tp->pending) {
 			/* We held off on this in tcp_send_skb() */
Index: oldkernel/linux/net/core/filter.c
diff -u linux/net/core/filter.c:1.1.1.1 linux/net/core/filter.c:1.2
--- linux/net/core/filter.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/core/filter.c	Thu Jun  1 15:44:00 2000
@@ -49,7 +49,7 @@
 	else if (k>=SKF_LL_OFF)
 		ptr = skb->mac.raw + k - SKF_LL_OFF;
 
-	if (ptr<skb->head && ptr < skb->tail)
+	if (ptr >= skb->head && ptr < skb->tail)
 		return ptr;
 	return NULL;
 }
Index: oldkernel/linux/net/ipv4/af_inet.c
diff -u linux/net/ipv4/af_inet.c:1.1.1.1 linux/net/ipv4/af_inet.c:1.2
--- linux/net/ipv4/af_inet.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/ipv4/af_inet.c	Thu Jun  1 15:44:00 2000
@@ -5,7 +5,7 @@
  *
  *		PF_INET protocol family socket handler.
  *
- * Version:	$Id: af_inet.c,v 1.87.2.5 1999/08/08 08:43:10 davem Exp $
+ * Version:	$Id: af_inet.c,v 1.87.2.6 2000/01/13 04:28:16 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -309,6 +309,7 @@
 				((struct tcp_bind_bucket*)sk->prev)->fastreuse = 0;
 		}
 
+		sk->zapped = 0;
 		dst_release(xchg(&sk->dst_cache, NULL));
 		sk->prot->hash(sk);
 		sk->socket->flags |= SO_ACCEPTCON;
@@ -546,6 +547,7 @@
 	if (sk->prot->get_port(sk, snum) != 0)
 		return -EADDRINUSE;
 
+	sk->zapped = 0;
 	sk->sport = htons(sk->num);
 	sk->daddr = 0;
 	sk->dport = 0;
@@ -626,6 +628,7 @@
 		if (inet_autobind(sk) != 0)
 			return(-EAGAIN);
 
+		sk->zapped = 0;
 		err = sk->prot->connect(sk, uaddr, addr_len);
 		/* Note: there is a theoretical race here when an wake up
 		   occurred before inet_wait_for_connect is entered. In 2.3
Index: oldkernel/linux/net/ipv4/devinet.c
diff -u linux/net/ipv4/devinet.c:1.1.1.1 linux/net/ipv4/devinet.c:1.2
--- linux/net/ipv4/devinet.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/ipv4/devinet.c	Thu Jun  1 15:44:00 2000
@@ -1,7 +1,7 @@
 /*
  *	NET3	IP device support routines.
  *
- *	Version: $Id: devinet.c,v 1.28.2.2 1999/08/07 10:56:18 davem Exp $
+ *	Version: $Id: devinet.c,v 1.28.2.3 1999/12/14 10:32:42 davem Exp $
  *
  *		This program is free software; you can redistribute it and/or
  *		modify it under the terms of the GNU General Public License
Index: oldkernel/linux/net/ipv4/proc.c
diff -u linux/net/ipv4/proc.c:1.1.1.1 linux/net/ipv4/proc.c:1.2
--- linux/net/ipv4/proc.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/ipv4/proc.c	Thu Jun  1 15:44:00 2000
@@ -7,7 +7,7 @@
  *		PROC file system.  It is mainly used for debugging and
  *		statistics.
  *
- * Version:	$Id: proc.c,v 1.34 1999/02/08 11:20:34 davem Exp $
+ * Version:	$Id: proc.c,v 1.34.2.1 2000/01/14 01:22:20 davem Exp $
  *
  * Authors:	Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
  *		Gerald J. Heim, <heim@peanuts.informatik.uni-tuebingen.de>
@@ -78,7 +78,7 @@
 {
 	unsigned long  dest, src;
 	unsigned short destp, srcp;
-	int timer_active, timer_active1, timer_active2;
+	int timer_active;
 	int tw_bucket = 0;
 	unsigned long timer_expires;
 	struct tcp_opt *tp = &sp->tp_pinfo.af_tcp;
@@ -105,27 +105,29 @@
 		int slot_dist;
 
 		tw_bucket	= 1;
-		timer_active1	= timer_active2 = 0;
 		timer_active	= 3;
 		slot_dist	= tw->death_slot;
-		if(slot_dist > tcp_tw_death_row_slot)
-			slot_dist = (TCP_TWKILL_SLOTS - slot_dist) + tcp_tw_death_row_slot;
+		if(slot_dist >= tcp_tw_death_row_slot)
+			slot_dist = slot_dist - tcp_tw_death_row_slot;
 		else
-			slot_dist = tcp_tw_death_row_slot - slot_dist;
+			slot_dist = (TCP_TWKILL_SLOTS - tcp_tw_death_row_slot) + slot_dist;
 		timer_expires	= jiffies + (slot_dist * TCP_TWKILL_PERIOD);
 	} else {
-		timer_active1 = del_timer(&tp->retransmit_timer);
-		timer_active2 = del_timer(&sp->timer);
-		if (!timer_active1) tp->retransmit_timer.expires=0;
-		if (!timer_active2) sp->timer.expires=0;
 		timer_active	= 0;
 		timer_expires	= (unsigned) -1;
 	}
-	if (timer_active1 && tp->retransmit_timer.expires < timer_expires) {
+	if (tp->retransmit_timer.prev != NULL &&
+	    tp->retransmit_timer.expires < timer_expires) {
 		timer_active	= 1;
 		timer_expires	= tp->retransmit_timer.expires;
 	}
-	if (timer_active2 && sp->timer.expires < timer_expires) {
+	if (tp->probe_timer.prev != NULL &&
+	    tp->probe_timer.expires < timer_expires) {
+		timer_active	= 4;
+		timer_expires	= tp->probe_timer.expires;
+	}
+	if (sp->timer.prev != NULL &&
+	    sp->timer.expires < timer_expires) {
 		timer_active	= 2;
 		timer_expires	= sp->timer.expires;
 	}
@@ -147,9 +149,6 @@
 		(!tw_bucket && sp->socket) ? sp->socket->inode->i_uid : 0,
 		(!tw_bucket && timer_active) ? sp->timeout : 0,
 		(!tw_bucket && sp->socket) ? sp->socket->inode->i_ino : 0);
-	
-	if (timer_active1) add_timer(&tp->retransmit_timer);
-	if (timer_active2) add_timer(&sp->timer);	
 }
 
 /*
Index: oldkernel/linux/net/ipv4/tcp.c
diff -u linux/net/ipv4/tcp.c:1.2 linux/net/ipv4/tcp.c:1.3
--- linux/net/ipv4/tcp.c:1.2	Thu Jun  1 15:08:25 2000
+++ linux/net/ipv4/tcp.c	Thu Jun  1 15:44:00 2000
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp.c,v 1.140.2.5 1999/09/23 19:21:16 davem Exp $
+ * Version:	$Id: tcp.c,v 1.140.2.8 2000/01/27 22:33:35 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -1448,12 +1448,11 @@
 		return;
 
 	/* If we've already sent a FIN, or it's a closed state, skip this. */
-	if ((1 << sk->state) &
-	    (TCPF_ESTABLISHED|TCPF_SYN_SENT|TCPF_SYN_RECV|TCPF_CLOSE_WAIT)) {
+	if ((1 << sk->state) & (TCPF_ESTABLISHED|TCPF_SYN_RECV|TCPF_SYN_SENT)) {
 		lock_sock(sk);
 
 		/* Clear out any half completed packets.  FIN if needed. */
-		if (tcp_close_state(sk,0))
+		if (tcp_close_state(sk,sk->state == TCP_CLOSE_WAIT))
 			tcp_send_fin(sk);
 
 		release_sock(sk);
Index: oldkernel/linux/net/ipv4/tcp_input.c
diff -u linux/net/ipv4/tcp_input.c:1.2 linux/net/ipv4/tcp_input.c:1.3
--- linux/net/ipv4/tcp_input.c:1.2	Thu Jun  1 15:08:25 2000
+++ linux/net/ipv4/tcp_input.c	Thu Jun  1 15:44:00 2000
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_input.c,v 1.164.2.8 1999/09/23 19:21:23 davem Exp $
+ * Version:	$Id: tcp_input.c,v 1.164.2.12 2000/01/31 20:43:36 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -270,10 +270,12 @@
 /* When we get a reset we do this. */
 static void tcp_reset(struct sock *sk)
 {
+	unsigned char orig_state = sk->state;
+
 	sk->zapped = 1;
 
 	/* We want the right error as BSD sees it (and indeed as we do). */
-	switch (sk->state) {
+	switch (orig_state) {
 		case TCP_SYN_SENT:
 			sk->err = ECONNREFUSED;
 			break;
@@ -284,6 +286,16 @@
 			sk->err = ECONNRESET;
 	};
 	tcp_set_state(sk, TCP_CLOSE);
+	if (orig_state == TCP_SYN_SENT) {
+		/* Back out identity changes done by connect.
+		 * The move to TCP_CLOSE has unhashed us and
+		 * killed the bind bucket reference, making this
+		 * safe. -DaveM
+		 */
+		sk->dport = 0;
+		sk->daddr = 0;
+		sk->num = 0;
+	}
 	sk->shutdown = SHUTDOWN_MASK;
 	if (!sk->dead) 
 		sk->state_change(sk);
@@ -988,7 +1000,7 @@
 	}
 
 	/* Check RST or SYN */
-	if(th->rst || th->syn) {
+	if(th->rst) {
 		/* This is TIME_WAIT assasination, in two flavors.
 		 * Oh well... nobody has a sufficient solution to this
 		 * protocol bug yet.
@@ -997,8 +1009,6 @@
 			tcp_tw_deschedule(tw);
 			tcp_timewait_kill(tw);
 		}
-		if(!th->rst)
-			return TCP_TW_RST; /* toss a reset back */
 		return 0;
 	} else {
 		/* In this case we must reset the TIMEWAIT timer. */
@@ -1129,11 +1139,6 @@
 
 	tcp_send_ack(sk);
 
-	if (!sk->dead) {
-		sk->state_change(sk);
-		sock_wake_async(sk->socket, 1, POLL_HUP);
-	}
-
 	switch(sk->state) {
 		case TCP_SYN_RECV:
 		case TCP_ESTABLISHED:
@@ -1177,6 +1182,11 @@
 			printk("tcp_fin: Impossible, sk->state=%d\n", sk->state);
 			break;
 	};
+
+	if (!sk->dead) {
+		sk->state_change(sk);
+		sock_wake_async(sk->socket, 1, POLL_HUP);
+	}
 }
 
 /* These routines update the SACK block as out-of-order packets arrive or
@@ -2406,7 +2416,8 @@
 		 * BSD 4.4 also does reset.
 		 */
 		if ((sk->shutdown & RCV_SHUTDOWN) && sk->dead) {
-			if (after(TCP_SKB_CB(skb)->end_seq - th->fin, tp->rcv_nxt)) {
+			if (TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq &&
+			    after(TCP_SKB_CB(skb)->end_seq - th->fin, tp->rcv_nxt)) {
 				tcp_reset(sk);
 				return 1;
 			}
Index: oldkernel/linux/net/ipv4/tcp_output.c
diff -u linux/net/ipv4/tcp_output.c:1.1.1.1 linux/net/ipv4/tcp_output.c:1.2
--- linux/net/ipv4/tcp_output.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/ipv4/tcp_output.c	Thu Jun  1 15:44:00 2000
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_output.c,v 1.108.2.1 1999/05/14 23:07:36 davem Exp $
+ * Version:	$Id: tcp_output.c,v 1.108.2.5 2000/01/14 01:22:18 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -165,7 +165,7 @@
 	tp->write_seq += (TCP_SKB_CB(skb)->end_seq - TCP_SKB_CB(skb)->seq);
 	__skb_queue_tail(&sk->write_queue, skb);
 
-	if (!force_queue && tp->send_head == NULL && tcp_snd_test(sk, skb)) {
+	if (!force_queue && tp->send_head == NULL && tcp_snd_test(sk, skb, 1)) {
 		/* Send it out now. */
 		TCP_SKB_CB(skb)->when = tcp_time_stamp;
 		tp->snd_nxt = TCP_SKB_CB(skb)->end_seq;
@@ -341,7 +341,8 @@
 		 * b) not exceeding our congestion window.
 		 * c) not retransmitting [Nagle]
 		 */
-		while((skb = tp->send_head) && tcp_snd_test(sk, skb)) {
+		while((skb = tp->send_head) &&
+		      tcp_snd_test(sk, skb, tcp_skb_is_last(sk, skb))) {
 			if (skb->len > mss_now) {
 				if (tcp_fragment(sk, skb, mss_now))
 					break;
@@ -752,12 +753,16 @@
 		}
 	} else {
 		/* Socket is locked, keep trying until memory is available. */
-		do {
+		for (;;) {
 			skb = sock_wmalloc(sk,
 					   (MAX_HEADER +
 					    sk->prot->max_header),
 					   1, GFP_KERNEL);
-		} while (skb == NULL);
+			if (skb)
+				break;
+			current->policy |= SCHED_YIELD;
+			schedule();
+		}
 
 		/* Reserve space for headers and prepare control bits. */
 		skb_reserve(skb, MAX_HEADER + sk->prot->max_header);
@@ -1004,7 +1009,7 @@
 	unsigned long timeout;
 
 	/* Stay within the limit we were given */
-	timeout = tp->ato;
+	timeout = (tp->ato << 1) >> 1;
 	if (timeout > max_timeout)
 		timeout = max_timeout;
 	timeout += jiffies;
@@ -1040,10 +1045,14 @@
 			 *
 			 * This is the one possible way that we can delay an
 			 * ACK and have tp->ato indicate that we are in
-			 * quick ack mode, so clear it.
+			 * quick ack mode, so clear it.  It is also the only
+			 * possible way for ato to be zero, when ACK'ing a
+			 * SYNACK because we've taken no ATO measurement yet.
 			 */
-			if(tcp_in_quickack_mode(tp))
+			if (tcp_in_quickack_mode(tp))
 				tcp_exit_quickack_mode(tp);
+			if (!tp->ato)
+				tp->ato = tp->rto;
 			tcp_send_delayed_ack(tp, HZ/2);
 			return;
 		}
Index: oldkernel/linux/net/ipv4/tcp_timer.c
diff -u linux/net/ipv4/tcp_timer.c:1.1.1.1 linux/net/ipv4/tcp_timer.c:1.2
--- linux/net/ipv4/tcp_timer.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/ipv4/tcp_timer.c	Thu Jun  1 15:44:00 2000
@@ -5,7 +5,7 @@
  *
  *		Implementation of the Transmission Control Protocol(TCP).
  *
- * Version:	$Id: tcp_timer.c,v 1.62.2.4 1999/09/23 19:21:39 davem Exp $
+ * Version:	$Id: tcp_timer.c,v 1.62.2.6 2000/01/13 04:28:06 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
@@ -131,6 +131,7 @@
 	} else {
 		/* Clean up time. */
 		tcp_set_state(sk, TCP_CLOSE);
+		sk->shutdown |= SHUTDOWN_MASK;
 		return 0;
 	}
 	return 1;
@@ -140,26 +141,46 @@
 static int tcp_write_timeout(struct sock *sk)
 {
 	struct tcp_opt *tp = &(sk->tp_pinfo.af_tcp);
+	unsigned char orig_state = sk->state;
+	int ret;
 
 	/* Look for a 'soft' timeout. */
-	if ((sk->state == TCP_ESTABLISHED &&
+	if ((orig_state == TCP_ESTABLISHED &&
 	     tp->retransmits && (tp->retransmits % TCP_QUICK_TRIES) == 0) ||
-	    (sk->state != TCP_ESTABLISHED && tp->retransmits > sysctl_tcp_retries1)) {
+	    (orig_state != TCP_ESTABLISHED && tp->retransmits > sysctl_tcp_retries1)) {
 		dst_negative_advice(&sk->dst_cache);
 	}
 	
 	/* Have we tried to SYN too many times (repent repent 8)) */
-	if(tp->retransmits > sysctl_tcp_syn_retries && sk->state==TCP_SYN_SENT) {
+	if(tp->retransmits > sysctl_tcp_syn_retries && orig_state==TCP_SYN_SENT) {
 		tcp_write_err(sk, 1);
+
 		/* Don't FIN, we got nothing back */
-		return 0;
+		ret = 0;
+	} else {
+		/* Has it gone just too far? */
+		if (tp->retransmits > sysctl_tcp_retries2) 
+			ret = tcp_write_err(sk, 0);
+		else
+			ret = 1;
 	}
 
-	/* Has it gone just too far? */
-	if (tp->retransmits > sysctl_tcp_retries2) 
-		return tcp_write_err(sk, 0);
+	/* Did we timeout a connecting socket?  The check must be
+	 * like this just in case someone sets syn_retries larger
+	 * than retries2, which is silly but handle it.  -DaveM
+	 */
+	if (orig_state == TCP_SYN_SENT && sk->state == TCP_CLOSE) {
+		/* Back out identity changes done by connect.
+		 * The move to TCP_CLOSE has unhashed us and
+		 * killed the bind bucket reference, making this
+		 * safe. -DaveM
+		 */
+		sk->dport = 0;
+		sk->daddr = 0;
+		sk->num = 0;
+	}
 
-	return 1;
+	return ret;
 }
 
 void tcp_delack_timer(unsigned long data)
Index: oldkernel/linux/net/ipv6/addrconf.c
diff -u linux/net/ipv6/addrconf.c:1.1.1.1 linux/net/ipv6/addrconf.c:1.2
--- linux/net/ipv6/addrconf.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/ipv6/addrconf.c	Thu Jun  1 15:44:00 2000
@@ -5,7 +5,7 @@
  *	Authors:
  *	Pedro Roque		<roque@di.fc.ul.pt>	
  *
- *	$Id: addrconf.c,v 1.48.2.1 1999/06/28 10:39:39 davem Exp $
+ *	$Id: addrconf.c,v 1.48.2.2 1999/12/14 10:32:53 davem Exp $
  *
  *	This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
Index: oldkernel/linux/net/ipv6/af_inet6.c
diff -u linux/net/ipv6/af_inet6.c:1.1.1.1 linux/net/ipv6/af_inet6.c:1.2
--- linux/net/ipv6/af_inet6.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/ipv6/af_inet6.c	Thu Jun  1 15:44:00 2000
@@ -7,7 +7,7 @@
  *
  *	Adapted from linux/net/ipv4/af_inet.c
  *
- *	$Id: af_inet6.c,v 1.43.2.1 1999/06/20 20:15:06 davem Exp $
+ *	$Id: af_inet6.c,v 1.43.2.2 2000/01/13 04:28:23 davem Exp $
  *
  *	This program is free software; you can redistribute it and/or
  *      modify it under the terms of the GNU General Public License
@@ -243,6 +243,7 @@
 	if(sk->prot->get_port(sk, snum) != 0)
 		return -EADDRINUSE;
 
+	sk->zapped = 0;
 	sk->sport = ntohs(sk->num);
 	sk->dport = 0;
 	sk->daddr = 0;
Index: oldkernel/linux/net/ipv6/proc.c
diff -u linux/net/ipv6/proc.c:1.1.1.1 linux/net/ipv6/proc.c:1.2
--- linux/net/ipv6/proc.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/ipv6/proc.c	Thu Jun  1 15:44:00 2000
@@ -7,7 +7,7 @@
  *		PROC file system.  This is very similar to the IPv4 version,
  *		except it reports the sockets in the INET6 address family.
  *
- * Version:	$Id: proc.c,v 1.9 1998/08/26 12:05:11 davem Exp $
+ * Version:	$Id: proc.c,v 1.9.2.1 2000/01/14 01:22:24 davem Exp $
  *
  * Authors:	David S. Miller (davem@caip.rutgers.edu)
  *
@@ -32,7 +32,7 @@
 {
 	struct sock *sp;
 	struct tcp_opt *tp;
-	int timer_active, timer_active1, timer_active2;
+	int timer_active;
 	unsigned long timer_expires;
 	struct in6_addr *dest, *src;
 	unsigned short destp, srcp;
@@ -76,30 +76,32 @@
 			extern int tcp_tw_death_row_slot;
 			int slot_dist;
 
-			timer_active1	= timer_active2 = 0;
 			timer_active	= 3;
 			slot_dist	= tw->death_slot;
-			if(slot_dist > tcp_tw_death_row_slot)
-				slot_dist = (TCP_TWKILL_SLOTS - slot_dist) + tcp_tw_death_row_slot;
+			if(slot_dist >= tcp_tw_death_row_slot)
+				slot_dist = slot_dist - tcp_tw_death_row_slot;
 			else
-				slot_dist = tcp_tw_death_row_slot - slot_dist;
+				slot_dist = (TCP_TWKILL_SLOTS - tcp_tw_death_row_slot) + slot_dist;
 			timer_expires	= jiffies + (slot_dist * TCP_TWKILL_PERIOD);
 		} else {
-			timer_active1 = del_timer(&tp->retransmit_timer);
-			timer_active2 = del_timer(&sp->timer);
-			if(!timer_active1) tp->retransmit_timer.expires = 0;
-			if(!timer_active2) sp->timer.expires = 0;
 			timer_active = 0;
 			timer_expires = (unsigned) -1;
 		}
-		if(timer_active1 && tp->retransmit_timer.expires < timer_expires) {
-			timer_active = timer_active1;
-			timer_expires = tp->retransmit_timer.expires;
+		if (tp->retransmit_timer.prev != NULL &&
+		    tp->retransmit_timer.expires < timer_expires) {
+			timer_active	= 1;
+			timer_expires	= tp->retransmit_timer.expires;
 		}
-		if(timer_active2 && sp->timer.expires < timer_expires) {
-			timer_active = timer_active2;
-			timer_expires = sp->timer.expires;
+		if (tp->probe_timer.prev != NULL &&
+		    tp->probe_timer.expires < timer_expires) {
+			timer_active	= 4;
+			timer_expires	= tp->probe_timer.expires;
 		}
+		if (sp->timer.prev != NULL &&
+		    sp->timer.expires < timer_expires) {
+			timer_active	= 2;
+			timer_expires	= sp->timer.expires;
+		}
 		if(timer_active == 0)
 			timer_expires = jiffies;
 		sprintf(tmpbuf, "%4d: %08X%08X%08X%08X:%04X %08X%08X%08X%08X:%04X "
@@ -128,8 +130,6 @@
 			((!tw_bucket && sp->socket) ?
 			 sp->socket->inode->i_ino : 0));
 
-		if(timer_active1) add_timer(&tp->retransmit_timer);
-		if(timer_active2) add_timer(&sp->timer);
 		len += sprintf(buffer+len, "%-148s\n", tmpbuf);
 		if(len >= length)
 			break;
Index: oldkernel/linux/net/ipv6/tcp_ipv6.c
diff -u linux/net/ipv6/tcp_ipv6.c:1.1.1.1 linux/net/ipv6/tcp_ipv6.c:1.2
--- linux/net/ipv6/tcp_ipv6.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/ipv6/tcp_ipv6.c	Thu Jun  1 15:44:00 2000
@@ -5,7 +5,7 @@
  *	Authors:
  *	Pedro Roque		<roque@di.fc.ul.pt>	
  *
- *	$Id: tcp_ipv6.c,v 1.104.2.10 1999/09/23 19:21:46 davem Exp $
+ *	$Id: tcp_ipv6.c,v 1.104.2.11 1999/12/03 09:30:29 davem Exp $
  *
  *	Based on: 
  *	linux/net/ipv4/tcp.c
Index: oldkernel/linux/net/packet/af_packet.c
diff -u linux/net/packet/af_packet.c:1.1.1.1 linux/net/packet/af_packet.c:1.2
--- linux/net/packet/af_packet.c:1.1.1.1	Wed May 31 12:33:49 2000
+++ linux/net/packet/af_packet.c	Thu Jun  1 15:44:00 2000
@@ -5,7 +5,7 @@
  *
  *		PACKET - implements raw packet sockets.
  *
- * Version:	$Id: af_packet.c,v 1.19 1999/03/21 05:23:03 davem Exp $
+ * Version:	$Id: af_packet.c,v 1.19.2.1 1999/12/04 05:45:02 davem Exp $
  *
  * Authors:	Ross Biro, <bir7@leland.Stanford.Edu>
  *		Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
