aboutsummaryrefslogtreecommitdiff
path: root/emulators/dynamips-devel/files
diff options
context:
space:
mode:
authorAndrej Zverev <az@FreeBSD.org>2011-02-10 20:35:33 +0000
committerAndrej Zverev <az@FreeBSD.org>2011-02-10 20:35:33 +0000
commit65296b5804b2da6be6cdf13a759933951c9ee264 (patch)
tree4bbc71087175b97a8fc18818fef01a72817c9a8b /emulators/dynamips-devel/files
parentb8344202c1759195c414744e29c101165a90206d (diff)
downloadports-65296b5804b2da6be6cdf13a759933951c9ee264.tar.gz
ports-65296b5804b2da6be6cdf13a759933951c9ee264.zip
- Fix not real world communications via gen_eth (FreeBSD's libpcap) issue [1]
- Add LICENSE [2] - Remove MD5 from distinfo PR: ports/154521 Submitted by: Alexander V. Chernikov <melifaro@ipfw.ru> [1] Pavel Volkov <pavelivolkov@googlemail.com> [2] (maintainer) Approved by: maintainer
Notes
Notes: svn path=/head/; revision=268896
Diffstat (limited to 'emulators/dynamips-devel/files')
-rw-r--r--emulators/dynamips-devel/files/patch-gen_eth.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/emulators/dynamips-devel/files/patch-gen_eth.c b/emulators/dynamips-devel/files/patch-gen_eth.c
new file mode 100644
index 000000000000..97f60cdd3222
--- /dev/null
+++ b/emulators/dynamips-devel/files/patch-gen_eth.c
@@ -0,0 +1,26 @@
+--- gen_eth.c.orig 2007-05-26 18:52:33.000000000 +0900
++++ gen_eth.c 2009-07-21 03:18:35.194759073 +0900
+@@ -22,6 +22,7 @@
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <sys/wait.h>
++#include <sys/ioctl.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+ #include <pthread.h>
+@@ -45,8 +46,13 @@
+ if (!(p = pcap_open_live(device,2048,TRUE,10,pcap_errbuf)))
+ goto pcap_error;
+
+- /* Accept only incoming packets */
+- pcap_setdirection(p,PCAP_D_IN);
++ pcap_setdirection(p,PCAP_D_INOUT);
++#ifdef BIOCFEEDBACK
++ {
++ int on = 1;
++ ioctl(pcap_fileno(p), BIOCFEEDBACK, &on);
++ }
++#endif
+ #else
+ p = pcap_open(device,2048,
+ PCAP_OPENFLAG_PROMISCUOUS |