summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmondson <dme@sun.com>2008-09-21 23:59:04 -0700
committerDavid Edmondson <dme@sun.com>2008-09-21 23:59:04 -0700
commiteff61088b42cee37cf1b09bac8888793f28230e6 (patch)
treef54d9d865d70b2d09b603ea881d072080f757947
parent076d97abc78bcba2f2216859fe2c6913cc7aff32 (diff)
downloadillumos-joyent-eff61088b42cee37cf1b09bac8888793f28230e6.tar.gz
6741794 vnic_bcast_send() needs to learn to deal with empty broadcast groups
-rw-r--r--usr/src/uts/common/io/vnic/vnic_bcast.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr/src/uts/common/io/vnic/vnic_bcast.c b/usr/src/uts/common/io/vnic/vnic_bcast.c
index bd3252b9af..28ba800fd5 100644
--- a/usr/src/uts/common/io/vnic/vnic_bcast.c
+++ b/usr/src/uts/common/io/vnic/vnic_bcast.c
@@ -19,12 +19,10 @@
* CDDL HEADER END
*/
/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/types.h>
#include <sys/sysmacros.h>
#include <sys/conf.h>
@@ -139,11 +137,15 @@ vnic_bcast_send(void *arg1, void *arg2, mblk_t *mp_chain)
uint64_t gen;
uint_t i;
mblk_t *mp_chain1;
- vnic_mac_t *vnic_mac = grp->vbg_vnics[0]->vn_vnic_mac;
+ vnic_mac_t *vnic_mac;
VNIC_BCAST_GRP_REFHOLD(grp);
rw_enter(grp_lock, RW_READER);
+ if (grp->vbg_nvnics == 0)
+ goto bail;
+ vnic_mac = grp->vbg_vnics[0]->vn_vnic_mac;
+
/*
* Pass a copy of the mp chain to every VNIC except the sender
* VNIC, if the packet was not received from the underlying NIC.