[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

(usagi-users 00536) [FIX] Re: Bug in ping6



On Mon, May 21, 2001 at 11:20:22PM +0200, Andreas Ferber wrote:
> 
> after receiving 1024 echo-replies from the ping target, all subsequent
> echo-replies are considered as dupes, although they are absolutely
> valid (and unique) replies. The ICMP sequence is incremented
> correctly.

The patch below my sig actually fixes this flaw.

Andreas
-- 
NEVER RESPOND TO CRITICAL PRESS.  IT IS A GAME YOU CAN ONLY LOSE, AND IT
MAKES US LOOK BAD.
	-- Bruce Perens

--- usagi-20010514/src/iputils/ping6.c.orig	Tue May 22 01:02:47 2001
+++ usagi-20010514/src/iputils/ping6.c	Tue May 22 01:03:12 2001
@@ -1340,7 +1340,7 @@
 	memset(icp, 0, sizeof(*icp));
 	icp->icmp6_cksum = 0;
 	seq = ntransmitted++;
-	CLR(seq & mx_dup_ck);
+	CLR(seq % mx_dup_ck);
 
 	if (ni_opts & F_NIFLAGS) {
 		icp->icmp6_type = ICMP6_NI_QUERY;