Bug 129687

Summary: [patch] unbreak net/tcpshow for gcc-4.2.1
Product: Ports & Packages Reporter: Eugene Grosbein <ports>
Component: Individual Port(s)Assignee: David E. O'Brien <obrien>
Status: Closed FIXED    
Severity: Affects Only Me CC: obrien
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Eugene Grosbein 2008-12-16 18:30:01 UTC
	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.

Fix: 

Eugene Grosbein--c3zelztrWorgjfjtCcwlibYBc6BpZSmi8FVHfbaoVxUsk8gQ
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

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) {
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
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-12-16 18:30:11 UTC
Responsible Changed
From-To: freebsd-ports-bugs->obrien

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Eugene Grosbein 2010-02-05 09:17:33 UTC
Hi!

Maintainer timeout has occured more than year ago, please commit this.
Comment 3 dfilter service freebsd_committer freebsd_triage 2010-02-13 16:53:34 UTC
miwi        2010-02-13 16:53:19 UTC

  FreeBSD ports repository

  Modified files:
    net/tcpshow/files    patch-02 
  Log:
  - Fix build with newer gcc
  
  PR:             129687
  Submitted by:   Eugene Grosbein <eugen@kuzbass.ru>
  Approved by:    maintainer timeout (more than 1 year ago)
  
  Revision  Changes    Path
  1.10      +1 -1      ports/net/tcpshow/files/patch-02
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 4 Martin Wilke freebsd_committer freebsd_triage 2010-02-13 16:53:48 UTC
State Changed
From-To: open->closed

Committed. Thanks!