diff options
author | mav <mav@FreeBSD.org> | 2015-04-20 14:55:01 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2015-04-20 14:55:01 +0000 |
commit | b8bb630aaa5cb08552bdd59418bf5fafc59da5cd (patch) | |
tree | bb38898dd5ca9365e71b80cc65349166fe3bd628 /usr.sbin/bhyve | |
parent | f62a422e61b1042f94c9d1e523d7f8a6c1f3d75f (diff) | |
download | FreeBSD-src-b8bb630aaa5cb08552bdd59418bf5fafc59da5cd.zip FreeBSD-src-b8bb630aaa5cb08552bdd59418bf5fafc59da5cd.tar.gz |
Report link as up if tap device is not specified (black hole).
MFC after: 2 weeks
Diffstat (limited to 'usr.sbin/bhyve')
-rw-r--r-- | usr.sbin/bhyve/pci_virtio_net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/bhyve/pci_virtio_net.c b/usr.sbin/bhyve/pci_virtio_net.c index ced8aa3..7227488 100644 --- a/usr.sbin/bhyve/pci_virtio_net.c +++ b/usr.sbin/bhyve/pci_virtio_net.c @@ -645,7 +645,7 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_devinst *pi, char *opts) 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())) |