summaryrefslogtreecommitdiff
path: root/emulators/qemu-devel/files/patch-tapclose
diff options
context:
space:
mode:
Diffstat (limited to 'emulators/qemu-devel/files/patch-tapclose')
-rw-r--r--emulators/qemu-devel/files/patch-tapclose17
1 files changed, 17 insertions, 0 deletions
diff --git a/emulators/qemu-devel/files/patch-tapclose b/emulators/qemu-devel/files/patch-tapclose
new file mode 100644
index 000000000000..8a96e3592a05
--- /dev/null
+++ b/emulators/qemu-devel/files/patch-tapclose
@@ -0,0 +1,17 @@
+Index: qemu/net/tap.c
+@@ -254,12 +254,12 @@ static void tap_cleanup(VLANClientState
+
+ qemu_purge_queued_packets(nc);
+
+- if (s->down_script[0])
+- launch_script(s->down_script, s->down_script_arg, s->fd);
+-
+ tap_read_poll(s, 0);
+ tap_write_poll(s, 0);
+ close(s->fd);
++
++ if (s->down_script[0])
++ launch_script(s->down_script, s->down_script_arg, -1);
+ }
+
+ /* fd support */