summaryrefslogtreecommitdiff
path: root/emulators/qemu/files/patch-tapclose
blob: 8da33adb673f02da36b7e2540e945810e3f1d452 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Index: qemu/net.c
@@ -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);
-
     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);
 }