patch-2.2.15 linux/net/ipv6/proc.c

Next file: linux/net/ipv6/tcp_ipv6.c
Previous file: linux/net/ipv6/af_inet6.c
Back to the patch index
Back to the overall index

diff -u --new-file --recursive --exclude-from ../../exclude v2.2.14/net/ipv6/proc.c linux/net/ipv6/proc.c
@@ -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,29 +76,31 @@
 			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;
@@ -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;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)