be sure to wipe out m_pkthdr when you set M_PKTHDR, you may see junk pointer

in m_pkthdr portion.
actually, we should not change pkthdr mbuf <-> non-pkthdr mbuf.
This commit is contained in:
Jun-ichiro itojun Hagino 2000-07-04 18:43:32 +00:00
parent 2881f702c7
commit 2f0dab8f41
2 changed files with 2 additions and 1 deletions

View File

@ -306,6 +306,7 @@ chain_mbufs(lnc_softc_t *sc, int start_of_packet, int pkt_len)
head = desc->buff.mbuf;
head->m_flags |= M_PKTHDR;
bzero(&head->m_pkthdr, sizeof(head->m_pkthdr));
m = head;
do {

View File

@ -813,7 +813,7 @@ vxget(sc, totlen)
sc->next_mb = (sc->next_mb + 1) % MAX_MBS;
m->m_data = m->m_pktdat;
m->m_flags = M_PKTHDR;
m->m_pkthdr.csum_flags = 0;
bzero(&m->m_pkthdr, sizeof(m->m_pkthdr));
}
m->m_pkthdr.rcvif = ifp;
m->m_pkthdr.len = totlen;