svn commit: r281767 - head/usr.sbin/bhyve

Alexander Motin mav at FreeBSD.org
Mon Apr 20 14:55:02 UTC 2015


Author: mav
Date: Mon Apr 20 14:55:01 2015
New Revision: 281767
URL: https://svnweb.freebsd.org/changeset/base/281767

Log:
  Report link as up if tap device is not specified (black hole).
  
  MFC after:	2 weeks

Modified:
  head/usr.sbin/bhyve/pci_virtio_net.c

Modified: head/usr.sbin/bhyve/pci_virtio_net.c
==============================================================================
--- head/usr.sbin/bhyve/pci_virtio_net.c	Mon Apr 20 14:23:18 2015	(r281766)
+++ head/usr.sbin/bhyve/pci_virtio_net.c	Mon Apr 20 14:55:01 2015	(r281767)
@@ -645,7 +645,7 @@ pci_vtnet_init(struct vmctx *ctx, struct
 	pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET);
 
 	/* Link is up if we managed to open tap device. */
-	sc->vsc_config.status = (sc->vsc_tapfd >= 0);
+	sc->vsc_config.status = (opts == NULL || sc->vsc_tapfd >= 0);
 	
 	/* use BAR 1 to map MSI-X table and PBA, if we're using MSI-X */
 	if (vi_intr_init(&sc->vsc_vs, 1, fbsdrun_virtio_msix()))


More information about the svn-src-all mailing list