summaryrefslogtreecommitdiff
path: root/emulators/qemu/files/pcap-patch-net_net.c
diff options
context:
space:
mode:
authorMuhammad Moinur Rahman <bofh@FreeBSD.org>2020-07-18 19:41:59 +0000
committerMuhammad Moinur Rahman <bofh@FreeBSD.org>2020-07-18 19:41:59 +0000
commit5698b5b6694bd33e17fdff7e9d30c0e36dd266ec (patch)
tree3698949e2eff2907989ad805ea5c68c2ee4c77d0 /emulators/qemu/files/pcap-patch-net_net.c
parentUpdate to 0.1.12 (diff)
emulators/qemu: Update version 4.1.1=>4.2.1
- Add OPTION CAPSTONE [1] PR: 247870 [1] Reported by: amdmi3 [1]
Notes
Notes: svn path=/head/; revision=542523
Diffstat (limited to 'emulators/qemu/files/pcap-patch-net_net.c')
-rw-r--r--emulators/qemu/files/pcap-patch-net_net.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/emulators/qemu/files/pcap-patch-net_net.c b/emulators/qemu/files/pcap-patch-net_net.c
index 6fa5ca941f7d..36a21bc0effe 100644
--- a/emulators/qemu/files/pcap-patch-net_net.c
+++ b/emulators/qemu/files/pcap-patch-net_net.c
@@ -1,6 +1,6 @@
---- net/net.c.orig 2018-04-24 16:30:47 UTC
+--- net/net.c.orig 2020-06-25 18:12:17 UTC
+++ net/net.c
-@@ -52,6 +52,11 @@
+@@ -55,6 +55,11 @@
#include "net/filter.h"
#include "qapi/string-output-visitor.h"
@@ -12,7 +12,7 @@
/* Net bridge is currently not supported for W32. */
#if !defined(_WIN32)
# define CONFIG_NET_BRIDGE
-@@ -929,7 +934,225 @@ static int net_init_nic(const Netdev *netdev, const ch
+@@ -935,7 +940,226 @@ static int net_init_nic(const Netdev *netdev, const ch
return idx;
}
@@ -95,6 +95,7 @@
+ struct PCAPState *s;
+ const char *ifname;
+ char errbuf[PCAP_ERRBUF_SIZE];
++ pcap_if_t *alldevsp;
+#if defined(_WIN32)
+ HANDLE h;
+#endif
@@ -111,7 +112,7 @@
+ nc = qemu_new_net_client(&net_pcap_info, peer, "pcap", ifname);
+ s = DO_UPCAST(struct PCAPState, nc, nc);
+
-+ if (ifname == NULL && (ifname = pcap_lookupdev(errbuf)) == NULL) {
++ if (ifname == NULL && (ifname = pcap_findalldevs(&alldevsp, errbuf)) == NULL) {
+ fprintf(stderr, "qemu: pcap_create: %s\n", errbuf);
+ goto fail;
+ }
@@ -238,7 +239,7 @@
static int (* const net_client_init_fun[NET_CLIENT_DRIVER__MAX])(
const Netdev *netdev,
const char *name,
-@@ -955,6 +1178,9 @@ static int (* const net_client_init_fun[NET_CLIENT_DRI
+@@ -961,6 +1185,9 @@ static int (* const net_client_init_fun[NET_CLIENT_DRI
#endif
#ifdef CONFIG_L2TPV3
[NET_CLIENT_DRIVER_L2TPV3] = net_init_l2tpv3,