patch-2.1.20 linux/net/ipv6/reassembly.c

Next file: linux/net/ipx/af_ipx.c
Previous file: linux/net/ipv6/ndisc.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.19/linux/net/ipv6/reassembly.c linux/net/ipv6/reassembly.c
@@ -57,10 +57,13 @@
 		      __u8 *nhptr,
 		      struct frag_hdr *fhdr)
 {
-	__u32	expires;
+	__u32	expires = jiffies + IPV6_FRAG_TIMEOUT;
 	int nh;
 
-	expires = del_timer(&fq->timer);
+	if (del_timer(&fq->timer))
+	{
+		expires = fq->timer.expires;
+	}
 
 	/*
 	 *	We queue the packet even if it's the last.
@@ -83,7 +86,7 @@
 		if ((nh = reasm_frag_1(fq, skb)))
 			return nh;
 	}
-		
+
 	fq->timer.expires = expires;
 	add_timer(&fq->timer);
 	

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