when change mbuf type, clear m_pkthdr so that we do not get panic with
old data in pointer fields. NOTE: we'll extend m_pkthdr field soon. Wondering: do mbuf pre-allocation code in elink3.c really buy us much performance? it comes with code duplicate/synchronization problem with sys/mbuf.h...
This commit is contained in:
parent
01ef320ff1
commit
1ccb9e8170
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: elink3.c,v 1.75 2000/02/08 12:49:12 enami Exp $ */
|
||||
/* $NetBSD: elink3.c,v 1.76 2000/02/25 03:39:13 itojun Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -1627,6 +1627,7 @@ epget(sc, totlen)
|
|||
sc->next_mb = (sc->next_mb + 1) % MAX_MBS;
|
||||
m->m_data = m->m_pktdat;
|
||||
m->m_flags = M_PKTHDR;
|
||||
bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
|
||||
}
|
||||
m->m_pkthdr.rcvif = ifp;
|
||||
m->m_pkthdr.len = totlen;
|
||||
|
|
Loading…
Reference in New Issue