diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-01-03 18:19:07 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-01-03 18:19:07 +0000 |
commit | d8ed1054415585ff91573c64d88c0c2a67483a28 (patch) | |
tree | 7b3dfacc664287a8664d2ae352b0d301cbde7db3 /sys/dev/pci/if_iwi.c | |
parent | 5747ef0336e7eb48a2f47780d36d81c50853ad57 (diff) |
M_DUP_PKTHDR() cleanup. On static mbufs M_DUP_PKTHDR() will leak mbuf tags.
See similar commit to dev/usb/if_rum.c for more info. With this commit
all drivers have been switched away from the incorrect M_DUP_PKTHDR() usage.
OK mglocker@
Diffstat (limited to 'sys/dev/pci/if_iwi.c')
-rw-r--r-- | sys/dev/pci/if_iwi.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c index 7d6908936a2..a9961587b90 100644 --- a/sys/dev/pci/if_iwi.c +++ b/sys/dev/pci/if_iwi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_iwi.c,v 1.78 2006/11/26 11:14:22 deraadt Exp $ */ +/* $OpenBSD: if_iwi.c,v 1.79 2007/01/03 18:19:06 claudio Exp $ */ /*- * Copyright (c) 2004-2006 @@ -963,11 +963,12 @@ iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data, if (frame->antenna & 0x40) tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE; - M_DUP_PKTHDR(&mb, m); mb.m_data = (caddr_t)tap; mb.m_len = sc->sc_rxtap_len; mb.m_next = m; - mb.m_pkthdr.len += mb.m_len; + mb.m_nextpkt = NULL; + mb.m_type = 0; + mb.m_flags = 0; bpf_mtap(sc->sc_drvbpf, &mb, BPF_DIRECTION_IN); } #endif @@ -1272,11 +1273,12 @@ iwi_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni) tap->wt_chan_freq = htole16(ic->ic_bss->ni_chan->ic_freq); tap->wt_chan_flags = htole16(ic->ic_bss->ni_chan->ic_flags); - M_DUP_PKTHDR(&mb, m0); mb.m_data = (caddr_t)tap; mb.m_len = sc->sc_txtap_len; mb.m_next = m0; - mb.m_pkthdr.len += mb.m_len; + mb.m_nextpkt = NULL; + mb.m_type = 0; + mb.m_flags = 0; bpf_mtap(sc->sc_drvbpf, &mb, BPF_DIRECTION_OUT); } #endif |