qemu/hw/net
Jason Wang d7108d9010 virtio-net: properly check the vhost status during status set
Commit 32993698 (vhost: disable on tap link down) tries to disable the vhost
also when the peer's link is down. But the check was not done properly, the
vhost were only started when:

1) peer's link is not down
2) virtio-net has already been started.

Since == have a higher precedence than &&, place a brace to make sure both the
conditions were met then does the check. This fixes the crash when doing a savem
after set the link off which let qemu crash and complains:

virtio_net_save: Assertion `!n->vhost_started' failed.

Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Message-id: 1366972060-21606-1-git-send-email-jasowang@redhat.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-07 06:43:09 -05:00
..
cadence_gem.c
dp8393x.c
e1000_regs.h
e1000.c
eepro100.c
etraxfs_eth.c
lan9118.c
lance.c
Makefile.objs
mcf_fec.c Remove unneeded type casts 2013-04-19 11:36:33 +02:00
milkymist-minimac2.c qdev: Drop taddr properties 2013-04-20 17:54:52 +00:00
mipsnet.c
ne2000-isa.c ne2000-isa: QOM'ify 2013-04-29 08:27:48 -05:00
ne2000.c
ne2000.h
opencores_eth.c
pcnet-pci.c
pcnet.c
pcnet.h
rtl8139.c
smc91c111.c
spapr_llan.c spapr_llan: fix device reenabling 2013-05-06 17:22:48 +02:00
stellaris_enet.c
vhost_net.c virtio: remove virtiobindings. 2013-04-24 11:50:20 -05:00
virtio-net.c virtio-net: properly check the vhost status during status set 2013-05-07 06:43:09 -05:00
vmware_utils.h
vmxnet3.c
vmxnet3.h
vmxnet_debug.h
vmxnet_rx_pkt.c
vmxnet_rx_pkt.h
vmxnet_tx_pkt.c include: avoid useless includes of exec/ headers 2013-04-15 18:19:26 +02:00
vmxnet_tx_pkt.h
xen_nic.c
xgmac.c sysemu: avoid proliferation of include/ subdirectories 2013-04-15 18:19:25 +02:00
xilinx_axienet.c stream: Remove app argument hack 2013-04-16 10:04:23 +02:00
xilinx_ethlite.c