Date: Wed, 17 Dec 2008 00:57:12 +0700 (KRAT) From: Eugene Grosbein <eugen@kuzbass.ru> To: FreeBSD-gnats-submit@FreeBSD.org Cc: obrien@FreeBSD.org Subject: ports/129687: [patch] unbreak net/tcpshow for gcc-4.2.1 Message-ID: <200812161757.mBGHvCSx012007@grosbein.pp.ru> Resent-Message-ID: <200812161830.mBGIU17K000847@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812161757.mBGHvCSx012007>