Commit b9adce2c833fae930f5bede2b8a3357697984e8c

Authored by Mark McLoughlin
Committed by Anthony Liguori
1 parent 8cad5516

net: purge queued packets in tap_cleanup()

If tap has any packets queued at host_net_remove time, it needs to purge
them in order to prevent a sent callback being invoked for it.

Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Showing 1 changed file with 2 additions and 0 deletions
... ... @@ -1128,6 +1128,8 @@ static void tap_cleanup(VLANClientState *vc)
1128 1128 {
1129 1129 TAPState *s = vc->opaque;
1130 1130  
  1131 + qemu_purge_queued_packets(vc);
  1132 +
1131 1133 if (s->down_script[0])
1132 1134 launch_script(s->down_script, s->down_script_arg, s->fd);
1133 1135  
... ...