summaryrefslogtreecommitdiffstats
path: root/contrib/traceroute
diff options
context:
space:
mode:
authortuexen <tuexen@FreeBSD.org>2015-05-30 19:52:28 +0000
committertuexen <tuexen@FreeBSD.org>2015-05-30 19:52:28 +0000
commite99dc1c8d6513eaf87ab23f6be27a188335d57c0 (patch)
tree2568948b8b33022ee2681da38945a28691627760 /contrib/traceroute
parent19ecd65a1e2f3d911c6688cde2001b3a95b4539b (diff)
downloadFreeBSD-src-e99dc1c8d6513eaf87ab23f6be27a188335d57c0.zip
FreeBSD-src-e99dc1c8d6513eaf87ab23f6be27a188335d57c0.tar.gz
Require the embedded packet to contain 8 bytes after the IP header instead
of only 4. This is guaranteed by RFC 792 and the verification of GRE, ICMP and TCP packets use 8 bytes. MFC after: 3 days
Diffstat (limited to 'contrib/traceroute')
-rw-r--r--contrib/traceroute/traceroute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/traceroute/traceroute.c b/contrib/traceroute/traceroute.c
index ed2a2ae..e05a532 100644
--- a/contrib/traceroute/traceroute.c
+++ b/contrib/traceroute/traceroute.c
@@ -1330,7 +1330,7 @@ packet_ok(register u_char *buf, int cc, register struct sockaddr_in *from,
hiplen = ((u_char *)icp + cc) - (u_char *)hip;
hlen = hip->ip_hl << 2;
inner = (u_char *)((u_char *)hip + hlen);
- if (hlen + 12 <= cc
+ if (hlen + 16 <= cc
&& hip->ip_p == proto->num
&& (*proto->check)(inner, (u_char)seq))
return (type == ICMP_TIMXCEED ? -1 : code + 1);
OpenPOWER on IntegriCloud