diff options
-rw-r--r-- | sys/arch/sparc/dev/hme.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/sparc/dev/hme.c b/sys/arch/sparc/dev/hme.c index 751a817cb92..616bfdfcc39 100644 --- a/sys/arch/sparc/dev/hme.c +++ b/sys/arch/sparc/dev/hme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hme.c,v 1.20 1999/08/20 04:55:03 jason Exp $ */ +/* $OpenBSD: hme.c,v 1.21 1999/12/10 03:03:56 jason Exp $ */ /* * Copyright (c) 1998 Jason L. Wright (jason@thought.net) @@ -822,8 +822,14 @@ hme_get(sc, idx, totlen) m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = totlen; pad = ALIGN(sizeof(struct ether_header)) - sizeof(struct ether_header); + len = MHLEN; + if (totlen >= MINCLSIZE) { + MCLGET(m, M_DONTWAIT); + if (m->m_flags & M_EXT) + len = MCLBYTES; + } m->m_data += pad; - len = MHLEN - pad; + len -= pad; top = NULL; mp = ⊤ |