ports/154521: [ports] emulators/dynamips-devel receives nothing from real interface
Alexander V. Chernikov
melifaro at ipfw.ru
Mon Feb 7 07:20:10 UTC 2011
The following reply was made to PR ports/154521; it has been noted by GNATS.
From: "Alexander V. Chernikov" <melifaro at ipfw.ru>
To: bug-followup at FreeBSD.org, melifaro at ipfw.ru
Cc:
Subject: Re: ports/154521: [ports] emulators/dynamips-devel receives nothing
from real interface
Date: Mon, 07 Feb 2011 10:16:49 +0300
This is a multi-part message in MIME format.
--------------020600050402060107000108
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
--------------020600050402060107000108
Content-Type: text/plain;
name="patch-gen_eth.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch-gen_eth.txt"
--- 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 |
--------------020600050402060107000108--
More information about the freebsd-ports-bugs
mailing list