net: drop packet from tap device if all NICs are down
commitb5eca4097db990dafbb153ee5d8ab200c10eeb8c
authorMark McLoughlin <markmc@redhat.com>
Sun, 17 May 2009 15:43:12 +0000 (17 10:43 -0500)
committerAvi Kivity <avi@redhat.com>
Thu, 21 May 2009 09:04:48 +0000 (21 12:04 +0300)
tree0b55c83556dfc7635a6d2cbf3073d9449dbd3a28
parentccdab5a34752a46d2b56c66552f6610660dc63bb
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.

[aliguori: rebased this patch on stable.  Mark, please review and Ack]

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