From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Dec 16 18:30:02 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D98A1065677 for ; Tue, 16 Dec 2008 18:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0CAA58FC1C for ; Tue, 16 Dec 2008 18:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mBGIU1Iq000848 for ; Tue, 16 Dec 2008 18:30:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mBGIU17K000847; Tue, 16 Dec 2008 18:30:01 GMT (envelope-from gnats) Resent-Date: Tue, 16 Dec 2008 18:30:01 GMT Resent-Message-Id: <200812161830.mBGIU17K000847@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eugene Grosbein Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14C411065678; Tue, 16 Dec 2008 18:26:07 +0000 (UTC) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (grosbein.pp.ru [89.189.172.146]) by mx1.freebsd.org (Postfix) with ESMTP id 6C55C8FC1A; Tue, 16 Dec 2008 18:26:06 +0000 (UTC) (envelope-from eugen@grosbein.pp.ru) Received: from grosbein.pp.ru (localhost [127.0.0.1]) by grosbein.pp.ru (8.14.3/8.14.3) with ESMTP id mBGHvDaF012008; Wed, 17 Dec 2008 00:57:13 +0700 (KRAT) (envelope-from eugen@grosbein.pp.ru) Received: (from eugen@localhost) by grosbein.pp.ru (8.14.3/8.14.3/Submit) id mBGHvCSx012007; Wed, 17 Dec 2008 00:57:12 +0700 (KRAT) (envelope-from eugen) Message-Id: <200812161757.mBGHvCSx012007@grosbein.pp.ru> Date: Wed, 17 Dec 2008 00:57:12 +0700 (KRAT) From: Eugene Grosbein To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: obrien@FreeBSD.org Subject: ports/129687: [patch] unbreak net/tcpshow for gcc-4.2.1 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Dec 2008 18:30:02 -0000 >Number: 129687 >Category: ports >Synopsis: [patch] unbreak net/tcpshow for gcc-4.2.1 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Dec 16 18:30:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Eugene Grosbein >Release: FreeBSD 7.1-PRERELEASE i386 >Organization: Svyaz-Service JSC >Environment: System: FreeBSD grosbein.pp.ru 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #0: Mon Nov 10 23:17:32 KRAT 2008 eu@grosbein.pp.ru:/usr/local/obj/usr/local/obj/src/sys/DADV i386 >Description: The port net/tcpshow is broken for RELENG_7 that uses gcc-4.2.1 due to the bug in tcpshow/files/patch-2 introduced with my PR: http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/113620 that made tcpshow compatible with tcpdump 3.8.x and later. This bug manifested with gcc-4.2.1 only. >How-To-Repeat: # tcpdump -lenx -s0 -p | tcpshow -cooked -noHostNames tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on em0, link-type EN10MB (Ethernet), capture size 65535 bytes --------------------------------------------------------------------------- Packet 1 ***Error: Badly formatted Ethernet address >Fix: diff -ur tcpshow.orig/files/patch-02 tcpshow/files/patch-02 --- tcpshow.orig/files/patch-02 2008-12-17 00:46:48.000000000 +0700 +++ tcpshow/files/patch-02 2008-12-17 00:48:10.000000000 +0700 @@ -223,7 +223,7 @@ + /* format: TIME MACSRC > MACDST, ethertype TYPE (0xCODE), ... */ + if (*eTo == '>') { + char *s; -+ (void)sscanf(p, "%s %s > %s", time, eFrom, eTo); ++ (void)sscanf(p, "%s %s > %17s", time, eFrom, eTo); + if ((s = strstr(p, "ethertype ")) != NULL) { + strlcpy(eType, s+10, sizeof(eType)); + if ((s = strchr(eType, ' ')) != NULL) { Eugene Grosbein >Release-Note: >Audit-Trail: >Unformatted: