summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2006-08-21 17:02:04 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2006-08-21 17:02:04 +0000
commit274fe522d523c56b1c1bd6cf54d2c84fcc2f77d7 (patch)
treea7b3bd7871bfa4e26f612bd6cce4a4f3864a9871 /sys/dev/pci
parent24c0e0d714e8579089a2deed15d0c366d1af09a6 (diff)
ramdisks do not have vlan, drop mbuf; ok brad
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_bnx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/pci/if_bnx.c b/sys/dev/pci/if_bnx.c
index f13a74c7518..89303c26537 100644
--- a/sys/dev/pci/if_bnx.c
+++ b/sys/dev/pci/if_bnx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bnx.c,v 1.21 2006/08/21 03:32:11 brad Exp $ */
+/* $OpenBSD: if_bnx.c,v 1.22 2006/08/21 17:02:03 deraadt Exp $ */
/*-
* Copyright (c) 2006 Broadcom Corporation
@@ -3768,6 +3768,7 @@ bnx_rx_intr(struct bnx_softc *sc)
* attach that information to the packet.
*/
if (status & L2_FHDR_STATUS_L2_VLAN_TAG) {
+#if NVLAN > 0
struct ether_vlan_header vh;
DBPRINT(sc, BNX_VERBOSE_SEND,
@@ -3791,6 +3792,10 @@ bnx_rx_intr(struct bnx_softc *sc)
(m = m_pullup(m, sizeof(vh))) == NULL)
goto bnx_rx_int_next_rx;
m_copyback(m, 0, sizeof(vh), &vh);
+#else
+ m_freem(m);
+ goto bnx_rx_int_next_rx;
+#endif
}
#if NBPFILTER > 0