summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Mustacchi <rm@joyent.com>2012-04-12 23:43:19 +0000
committerRobert Mustacchi <rm@joyent.com>2012-04-12 23:43:19 +0000
commit6df50a0c5e1cdf18eac5dcd467b1f08f57fad7a0 (patch)
tree7d43cad3b89e25ef54fae0805aab865176952c6d
parent099e212e968550ab97f7ba3431e55d9c16a0c78d (diff)
downloadillumos-kvm-cmd-6df50a0c5e1cdf18eac5dcd467b1f08f57fad7a0.tar.gz
HVM-728 Multicast isn't available to VMs
-rw-r--r--net/vnic.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/vnic.c b/net/vnic.c
index 8813de0..b54a040 100644
--- a/net/vnic.c
+++ b/net/vnic.c
@@ -314,12 +314,24 @@ net_init_vnic(QemuOpts *opts, Monitor *mon, const char *name, VLANState *vlan)
}
}
+ /*
+ * We are enabling support for two different kinds of promiscuous modes.
+ * The first is getting us the basics of the unicast traffic that we
+ * care about. The latter is going to ensure that we also get other
+ * types of physical traffic such as multicast and broadcast.
+ */
if (dlpi_promiscon(vsp->vns_hdl, DL_PROMISC_SAP) != DLPI_SUCCESS) {
error_report("vnic: failed to be promiscous with interface %s",
ifname);
return (-1);
}
+ if (dlpi_promiscon(vsp->vns_hdl, DL_PROMISC_PHYS) != DLPI_SUCCESS) {
+ error_report("vnic: failed to be promiscous with interface %s",
+ ifname);
+ return (-1);
+ }
+
fd = dlpi_fd(vsp->vns_hdl);
if (fcntl(fd, F_SETFL, O_NONBLOCK) < 0) {