net: drop packet from tap device if all NICs are down
commit252c47f8aaee3f03aa55b8c4b6e3d3badf2303b7
authorMark McLoughlin <markmc@redhat.com>
Wed, 22 Apr 2009 14:56:34 +0000 (22 15:56 +0100)
committerAvi Kivity <avi@redhat.com>
Thu, 23 Apr 2009 15:23:55 +0000 (23 18:23 +0300)
treea8a17561f9f594d55e11756adf1dcfd7e5d60b0a
parent2919cca637853ceb646689bc624cd19d52805aaf
net: drop packet from tap device if all NICs are down

If you do e.g. "set_link virtio.0 down" and there are packets
pending on the tap interface, we currently buffer a packet
and constantly try and send it until the link is up again.

We actually just want to drop the packet if the NIC is down.
Upstream qemu already does this, we just differ because we
buffer packets from the tap interface.

Reported-by: Yan Vugenfirer <yvugenfi@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
net.c