Module Name: src
Committed By: christos
Date: Thu May 13 18:19:18 UTC 2010
Modified Files:
src/usr.sbin/traceroute6: traceroute6.c
Log Message:
PR/19069: SUENAGA Hiroki: Original fix was defective because on big endian
the expression is not truncated to 16 bits, thus sending to port 65536 makes
the == 0 test fail and the packet ends up being sent.
To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/usr.sbin/traceroute6/traceroute6.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/traceroute6/traceroute6.c
diff -u src/usr.sbin/traceroute6/traceroute6.c:1.38 src/usr.sbin/traceroute6/traceroute6.c:1.39
--- src/usr.sbin/traceroute6/traceroute6.c:1.38 Mon Feb 16 15:36:11 2009
+++ src/usr.sbin/traceroute6/traceroute6.c Thu May 13 14:19:18 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: traceroute6.c,v 1.38 2009/02/16 20:36:11 is Exp $ */
+/* $NetBSD: traceroute6.c,v 1.39 2010/05/13 18:19:18 christos Exp $ */
/* $KAME: traceroute6.c,v 1.67 2004/01/25 03:24:39 itojun Exp $ */
/*
@@ -75,7 +75,7 @@
#else
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: traceroute6.c,v 1.38 2009/02/16 20:36:11 is Exp $");
+__RCSID("$NetBSD: traceroute6.c,v 1.39 2010/05/13 18:19:18 christos Exp $");
#endif
#endif
@@ -864,7 +864,7 @@
struct timeval t1, t2;
(void) gettimeofday(&t1, NULL);
- if (!useicmp && htons(port + seq + 1) == 0)
+ if (!useicmp && htons((in_port_t)(port + seq + 1)) == 0)
seq++;
send_probe(++seq, hops);
while ((cc = wait_for_reply(rcvsock, &rcvmhdr))) {