diff --git a/net/tcptrace/Makefile b/net/tcptrace/Makefile index 4af48347a4a3..63b41285e685 100644 --- a/net/tcptrace/Makefile +++ b/net/tcptrace/Makefile @@ -1,40 +1,40 @@ PORTNAME= tcptrace PORTVERSION= 6.6.8 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net #MASTER_SITES= http://www.tcptrace.org/download/ MAINTAINER= se@FreeBSD.org COMMENT= TCP dump file analysis tool WWW= https://sourceforge.net/projects/open-tcptrace/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING USES= bison GNU_CONFIGURE= yes ALL_TARGET= tcptrace USE_GITHUB= yes GH_ACCOUNT= blitz GH_TAGNAME= 508f73a PLIST_FILES= bin/tcptrace \ bin/xpl2gpl \ share/man/man1/tcptrace.1.gz PORTDOCS= ARGS CHANGES FAQ README README.mailing_list \ README.modules README.tline_graphs README.tput_graphs \ README.version README.xpl2gpl THANKS dot_tcptracerc OPTIONS_DEFINE= DOCS do-install: ${INSTALL_PROGRAM} ${WRKSRC}/tcptrace ${STAGEDIR}${PREFIX}/bin ${INSTALL_SCRIPT} ${WRKSRC}/xpl2gpl ${STAGEDIR}${PREFIX}/bin ${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.man ${STAGEDIR}${PREFIX}/share/man/man1/${PORTNAME}.1 do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} .include diff --git a/net/tcptrace/files/patch-tcpdump.c b/net/tcptrace/files/patch-tcpdump.c index f82fb83b2b38..936c571a965c 100644 --- a/net/tcptrace/files/patch-tcpdump.c +++ b/net/tcptrace/files/patch-tcpdump.c @@ -1,17 +1,36 @@ --- tcpdump.c.orig 2013-07-01 18:43:14 UTC +++ tcpdump.c -@@ -114,10 +114,13 @@ static int callback( +@@ -68,9 +68,6 @@ static char const GCC_UNUSED rcsid[] = + + + +-/* external ref, in case missing in older version */ +-extern int pcap_offline_read(void *, int, pcap_handler, u_char *); +- + /* global pointer, the pcap info header */ + static pcap_t *pcap; + +@@ -114,10 +111,13 @@ static int callback( /* for some reason, the windows version of tcpdump is using */ /* this. It looks just like ethernet to me */ case PCAP_DLT_EN10MB: - offset = find_ip_eth(buf); /* Here we check if we are dealing with Straight Ethernet encapsulation or PPPoE */ + offset = find_ip_eth(buf); /* Here we check if we are dealing with Straight Ethernet encapsulation, PPPoE or .1q VLAN encapsulation */ memcpy(ð_header, buf, EH_SIZE); /* save ether header */ switch (offset) { + case EH_SIZE + ETHER_VLAN_ENCAP_LEN: + memcpy(ð_header.ether_type, buf+EH_SIZE+2, 2); + /* FALLTHROUGH */ case EH_SIZE: /* straight Ethernet encapsulation */ memcpy((char *)ip_buf,buf+offset,iplen-offset); callback_plast = ip_buf+iplen-offset-1; +@@ -250,7 +250,7 @@ pread_tcpdump( + int ret; + + while (1) { +- if ((ret = pcap_offline_read(pcap,1,(pcap_handler)callback,0)) != 1) { ++ if ((ret = pcap_dispatch(pcap,1,(pcap_handler)callback,0)) != 1) { + /* prob EOF */ + + if (ret == -1) {