diff options
author | itojun <itojun@FreeBSD.org> | 2000-07-04 18:43:32 +0000 |
---|---|---|
committer | itojun <itojun@FreeBSD.org> | 2000-07-04 18:43:32 +0000 |
commit | b59a314956a87ed86e7fd48275543ff1ee0f5a65 (patch) | |
tree | 1adb0908c8a3ae71b39d80d1e81078d3c26c90c1 /sys | |
parent | 8d5454b61a39935066e62212acc62c2786652099 (diff) | |
download | FreeBSD-src-b59a314956a87ed86e7fd48275543ff1ee0f5a65.zip FreeBSD-src-b59a314956a87ed86e7fd48275543ff1ee0f5a65.tar.gz |
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.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/lnc/if_lnc.c | 1 | ||||
-rw-r--r-- | sys/dev/vx/if_vx.c | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/lnc/if_lnc.c b/sys/dev/lnc/if_lnc.c index 960393c..d1c6e68 100644 --- a/sys/dev/lnc/if_lnc.c +++ b/sys/dev/lnc/if_lnc.c @@ -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 { diff --git a/sys/dev/vx/if_vx.c b/sys/dev/vx/if_vx.c index 33f376f..303cd94 100644 --- a/sys/dev/vx/if_vx.c +++ b/sys/dev/vx/if_vx.c @@ -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; |