mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-27 00:57:50 +00:00
- Update to 5.2.2 and improve the bpf kernel bug (kern/84823) workaround [1]
- Take maintainership [1]: PR: ports/92694 Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz>
This commit is contained in:
parent
4d673e0663
commit
54a0cec780
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=155027
@ -6,15 +6,13 @@
|
||||
#
|
||||
|
||||
PORTNAME= trafshow
|
||||
PORTVERSION= 5.2.1
|
||||
PORTREVISION= 1
|
||||
PORTVERSION= 5.2.2
|
||||
PORTEPOCH= 1
|
||||
CATEGORIES= net
|
||||
MASTER_SITES= ${MASTER_SITE_NETBSD} \
|
||||
ftp://ftp.nsk.su/pub/RinetSoftware/
|
||||
MASTER_SITES= ftp://ftp.nsk.su/pub/RinetSoftware/
|
||||
EXTRACT_SUFX= .tgz
|
||||
|
||||
MAINTAINER= ports@FreeBSD.org
|
||||
MAINTAINER= jylefort@FreeBSD.org
|
||||
COMMENT= Full screen visualization of network traffic
|
||||
|
||||
USE_REINPLACE= yes
|
||||
|
@ -1,3 +1,3 @@
|
||||
MD5 (trafshow-5.2.1.tgz) = e3ad2e3f1aac2e1bac9b467df44cf8f0
|
||||
SHA256 (trafshow-5.2.1.tgz) = 7aa55cd88fe25b212ef15420fdf4a812d8296f6df3005ea77cde7c6716e9c574
|
||||
SIZE (trafshow-5.2.1.tgz) = 123770
|
||||
MD5 (trafshow-5.2.2.tgz) = 6fbf6668b87415ff0baa75021204a264
|
||||
SHA256 (trafshow-5.2.2.tgz) = 7b6b014d9e67c9a09e66caa002208071d603067782c3b86e1ddb9a6aefe5ff25
|
||||
SIZE (trafshow-5.2.2.tgz) = 124191
|
||||
|
31
net/trafshow/files/patch-show_dump.c
Normal file
31
net/trafshow/files/patch-show_dump.c
Normal file
@ -0,0 +1,31 @@
|
||||
--- show_dump.c.orig Mon Jul 12 07:21:09 2004
|
||||
+++ show_dump.c Wed Feb 1 18:07:01 2006
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/ioctl.h>
|
||||
#include <sys/time.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
@@ -118,6 +119,7 @@
|
||||
bpf_u_int32 net;
|
||||
bpf_u_int32 mask;
|
||||
char name[100], buf[256];
|
||||
+ u_int v;
|
||||
|
||||
/* sanity check */
|
||||
if (!ph || !ns) return -1;
|
||||
@@ -141,6 +143,12 @@
|
||||
if (!live_pcap) return -1;
|
||||
if (pcap_setnonblock(live_pcap, 1, buf) < 0) {
|
||||
screen_status("%s: %s", ph->name, buf);
|
||||
+ show_dump_close();
|
||||
+ return -1;
|
||||
+ }
|
||||
+ v = 1;
|
||||
+ if (ioctl(pcap_fileno(live_pcap), BIOCIMMEDIATE, &v) < 0) {
|
||||
+ screen_status("%s: %s", ph->name, strerror(errno));
|
||||
show_dump_close();
|
||||
return -1;
|
||||
}
|
@ -1,11 +1,32 @@
|
||||
--- trafshow.c.orig Mon Jul 12 07:20:41 2004
|
||||
+++ trafshow.c Mon Nov 7 22:25:56 2005
|
||||
@@ -305,7 +305,7 @@
|
||||
fprintf(stderr, "%s: %s\n", dp->name, buf);
|
||||
err++;
|
||||
--- trafshow.c.orig Sun Jan 8 08:05:29 2006
|
||||
+++ trafshow.c Wed Feb 1 18:07:33 2006
|
||||
@@ -20,6 +20,7 @@
|
||||
#endif
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
+#include <sys/ioctl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
@@ -281,6 +282,7 @@
|
||||
pcap_t *pd;
|
||||
PCAP_HANDLER *ph, *ph_prev = 0;
|
||||
char buf[256];
|
||||
+ u_int v;
|
||||
|
||||
if (!ph_list) return -1;
|
||||
|
||||
@@ -307,6 +309,13 @@
|
||||
}
|
||||
- if (pcap_setnonblock(pd, 1, buf) < 0) {
|
||||
+ if (pcap_setnonblock(pd, 0, buf) < 0) {
|
||||
if (pcap_setnonblock(pd, 1, buf) < 0) {
|
||||
fprintf(stderr, "%s: %s\n", dp->name, buf);
|
||||
+ pcap_close(pd);
|
||||
+ err++;
|
||||
+ continue;
|
||||
+ }
|
||||
+ v = 1;
|
||||
+ if (ioctl(pcap_fileno(pd), BIOCIMMEDIATE, &v) < 0) {
|
||||
+ fprintf(stderr, "%s: %s\n", dp->name, strerror(errno));
|
||||
pcap_close(pd);
|
||||
err++;
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user