Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 May 2015 19:52:28 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r283785 - head/contrib/traceroute
Message-ID:  <201505301952.t4UJqShJ087649@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Sat May 30 19:52:28 2015
New Revision: 283785
URL: https://svnweb.freebsd.org/changeset/base/283785

Log:
  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

Modified:
  head/contrib/traceroute/traceroute.c

Modified: head/contrib/traceroute/traceroute.c
==============================================================================
--- head/contrib/traceroute/traceroute.c	Sat May 30 19:48:40 2015	(r283784)
+++ head/contrib/traceroute/traceroute.c	Sat May 30 19:52:28 2015	(r283785)
@@ -1330,7 +1330,7 @@ packet_ok(register u_char *buf, int cc, 
 		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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505301952.t4UJqShJ087649>