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_ipw.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_ipw.c')
-rw-r--r-- | sys/dev/pci/if_ipw.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c index 216352972a5..9e3a738784c 100644 --- a/sys/dev/pci/if_ipw.c +++ b/sys/dev/pci/if_ipw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ipw.c,v 1.65 2006/11/26 11:14:22 deraadt Exp $ */ +/* $OpenBSD: if_ipw.c,v 1.66 2007/01/03 18:19:06 claudio Exp $ */ /*- * Copyright (c) 2004-2006 @@ -883,11 +883,12 @@ ipw_data_intr(struct ipw_softc *sc, struct ipw_status *status, tap->wr_chan_freq = htole16(ic->ic_ibss_chan->ic_freq); tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags); - 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 @@ -1147,11 +1148,12 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node *ni) tap->wt_chan_freq = htole16(ic->ic_ibss_chan->ic_freq); tap->wt_chan_flags = htole16(ic->ic_ibss_chan->ic_flags); - M_DUP_PKTHDR(&mb, m); mb.m_data = (caddr_t)tap; mb.m_len = sc->sc_txtap_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_OUT); } #endif |