diff options
Diffstat (limited to 'emulators/qemu/files/patch-tapclose')
-rw-r--r-- | emulators/qemu/files/patch-tapclose | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/emulators/qemu/files/patch-tapclose b/emulators/qemu/files/patch-tapclose index 1dde3ca9342d..8da33adb673f 100644 --- a/emulators/qemu/files/patch-tapclose +++ b/emulators/qemu/files/patch-tapclose @@ -1,16 +1,18 @@ Index: qemu/net.c -@@ -788,11 +788,11 @@ - { - TAPState *s = vc->opaque; +@@ -1643,12 +1643,13 @@ static void tap_cleanup(VLANClientState + + qemu_purge_queued_packets(vc); - if (s->down_script[0]) - launch_script(s->down_script, s->down_script_arg, s->fd); - - qemu_set_fd_handler(s->fd, NULL, NULL, NULL); + 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); ++ qemu_free(s); } |