From owner-svn-src-stable-8@FreeBSD.ORG Wed May 9 13:08:26 2012 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 947C6106564A; Wed, 9 May 2012 13:08:26 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7EDDA8FC1A; Wed, 9 May 2012 13:08:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q49D8QaD084229; Wed, 9 May 2012 13:08:26 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q49D8Qml084227; Wed, 9 May 2012 13:08:26 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201205091308.q49D8Qml084227@svn.freebsd.org> From: Michael Tuexen Date: Wed, 9 May 2012 13:08:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r235163 - stable/8/contrib/traceroute X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2012 13:08:26 -0000 Author: tuexen Date: Wed May 9 13:08:26 2012 New Revision: 235163 URL: http://svn.freebsd.org/changeset/base/235163 Log: MFC r234701: Fix a bug in the TCP tracerouting which resulted in not accepting any incoming packets. So all packets seemed to be lost. Modified: stable/8/contrib/traceroute/traceroute.c Directory Properties: stable/8/contrib/traceroute/ (props changed) Modified: stable/8/contrib/traceroute/traceroute.c ============================================================================== --- stable/8/contrib/traceroute/traceroute.c Wed May 9 11:01:39 2012 (r235162) +++ stable/8/contrib/traceroute/traceroute.c Wed May 9 13:08:26 2012 (r235163) @@ -1406,8 +1406,7 @@ tcp_prep(struct outdata *outdata) tcp->th_sport = htons(ident); tcp->th_dport = htons(port + (fixedPort ? 0 : outdata->seq)); - tcp->th_seq = (tcp->th_sport << 16) | (tcp->th_dport + - (fixedPort ? outdata->seq : 0)); + tcp->th_seq = (tcp->th_sport << 16) | tcp->th_dport; tcp->th_ack = 0; tcp->th_off = 5; tcp->th_flags = TH_SYN; @@ -1425,8 +1424,8 @@ tcp_check(const u_char *data, int seq) struct tcphdr *const tcp = (struct tcphdr *) data; return (ntohs(tcp->th_sport) == ident - && ntohs(tcp->th_dport) == port + (fixedPort ? 0 : seq)) - && tcp->th_seq == (((tcp_seq)ident << 16) | (port + seq)); + && ntohs(tcp->th_dport) == port + (fixedPort ? 0 : seq) + && tcp->th_seq == (tcp_seq)((tcp->th_sport << 16) | tcp->th_dport)); } void