summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorgene <gene@cvs.openbsd.org>1997-04-25 22:15:27 +0000
committergene <gene@cvs.openbsd.org>1997-04-25 22:15:27 +0000
commit1ec5839e1fda85b58e8cb18c768fc24dac5554aa (patch)
tree59456f300378571ffe4570c9325230c84a795cd1 /sys
parentc2503e547a7d56f7aa2cdafbdebfcc0af6012a10 (diff)
Cool. Drop oversized packets rather than splitting into mbufs. NetBSD log:
>From Mycroft: If we fail to allocate a cluster to hold a large packet, >simply drop it rather than using a chain of tiny mbufs.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mac68k/dev/if_ae.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/arch/mac68k/dev/if_ae.c b/sys/arch/mac68k/dev/if_ae.c
index e2a2dcb4fd5..b86ffde3894 100644
--- a/sys/arch/mac68k/dev/if_ae.c
+++ b/sys/arch/mac68k/dev/if_ae.c
@@ -1,5 +1,5 @@
-/* $OpenBSD: if_ae.c,v 1.12 1997/04/17 17:46:41 gene Exp $ */
-/* $NetBSD: if_ae.c,v 1.61 1997/04/14 16:28:34 scottr Exp $ */
+/* $OpenBSD: if_ae.c,v 1.13 1997/04/25 22:15:26 gene Exp $ */
+/* $NetBSD: if_ae.c,v 1.62 1997/04/24 16:52:05 scottr Exp $ */
/*
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
@@ -960,8 +960,11 @@ aeget(sc, src, total_len)
}
if (total_len >= MINCLSIZE) {
MCLGET(m, M_DONTWAIT);
- if (m->m_flags & M_EXT)
- len = MCLBYTES;
+ if ((m->m_flags & M_EXT) == 0) {
+ m_freem(top);
+ return 0;
+ }
+ len = MCLBYTES;
}
m->m_len = len = min(total_len, len);
src = ae_ring_copy(sc, src, mtod(m, caddr_t), len);