summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcperciva <cperciva@FreeBSD.org>2004-01-23 06:55:15 +0000
committercperciva <cperciva@FreeBSD.org>2004-01-23 06:55:15 +0000
commit47f77ea3ba6379b049725acda787a650b70149fd (patch)
tree3d0695623c7d2e9c066c377f753fc3de47bae8c3
parent2ee2805e83ca8e4e817a5595d3a1c31240603680 (diff)
downloadFreeBSD-src-47f77ea3ba6379b049725acda787a650b70149fd.zip
FreeBSD-src-47f77ea3ba6379b049725acda787a650b70149fd.tar.gz
Fix traceroute where [number of hops] * [number of packets per hop] > 255.
PR: misc/61336 Submitted by: Mike Hibler <mike@cs.utah.edu> Approved by: rwatson (mentor)
-rw-r--r--contrib/traceroute/traceroute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c
index 2c91466..5044eab 100644
--- a/contrib/traceroute/traceroute.c
+++ b/contrib/traceroute/traceroute.c
@@ -1230,7 +1230,7 @@ packet_ok(register u_char *buf, int cc, register struct sockaddr_in *from,
}
if (type == ICMP_ECHOREPLY
&& proto->num == IPPROTO_ICMP
- && (*proto->check)((u_char *)icp,seq))
+ && (*proto->check)((u_char *)icp, (u_char)seq))
return -2;
if ((type == ICMP_TIMXCEED && code == ICMP_TIMXCEED_INTRANS) ||
type == ICMP_UNREACH) {
@@ -1242,7 +1242,7 @@ packet_ok(register u_char *buf, int cc, register struct sockaddr_in *from,
inner = (u_char *)((u_char *)hip + hlen);
if (hlen + 12 <= cc
&& hip->ip_p == proto->num
- && (*proto->check)(inner, seq))
+ && (*proto->check)(inner, (u_char)seq))
return (type == ICMP_TIMXCEED ? -1 : code + 1);
}
#ifndef ARCHAIC
OpenPOWER on IntegriCloud