diff options
author | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2006-02-01 21:14:37 +0000 |
---|---|---|
committer | Jean-Yves Lefort <jylefort@FreeBSD.org> | 2006-02-01 21:14:37 +0000 |
commit | 54a0cec780c773071a56dc1ac61fe7bbfe3a0461 (patch) | |
tree | eeec4bc8a48f995e3eff17b1c11ad12e4ee3f0ff /net/trafshow/files/patch-show_dump.c | |
parent | Fix the packing list on Perl 5.005 - s/mach/%%PERL_ARCH%%/. (diff) |
- 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>
Notes
Notes:
svn path=/head/; revision=155027
Diffstat (limited to 'net/trafshow/files/patch-show_dump.c')
-rw-r--r-- | net/trafshow/files/patch-show_dump.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/net/trafshow/files/patch-show_dump.c b/net/trafshow/files/patch-show_dump.c new file mode 100644 index 000000000000..6e7fc4bbfc35 --- /dev/null +++ b/net/trafshow/files/patch-show_dump.c @@ -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; + } |