reclaim mbuf when ieee80211_crypto_encap fails
Approved by: re (scottl) Obtained from: netbsd
This commit is contained in:
parent
8225bf4c36
commit
82145663e3
@ -1321,8 +1321,10 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni)
|
||||
|
||||
if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
|
||||
k = ieee80211_crypto_encap(ic, ni, m0);
|
||||
if (k == NULL)
|
||||
if (k == NULL) {
|
||||
m_freem(m0);
|
||||
return ENOBUFS;
|
||||
}
|
||||
|
||||
/* packet header may have moved, reset our local pointer */
|
||||
wh = mtod(m0, struct ieee80211_frame *);
|
||||
|
@ -1355,8 +1355,10 @@ iwi_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni)
|
||||
bcopy(mtod(m0, struct ieee80211_frame *), &wh, sizeof (struct ieee80211_frame));
|
||||
if (wh.i_fc[1] & IEEE80211_FC1_WEP) {
|
||||
k = ieee80211_crypto_encap(ic, ni, m0);
|
||||
if (k == NULL)
|
||||
if (k == NULL) {
|
||||
m_freem(m0);
|
||||
return ENOBUFS;
|
||||
}
|
||||
}
|
||||
|
||||
if (sc->sc_drvbpf != NULL) {
|
||||
|
@ -1900,8 +1900,10 @@ ral_tx_data(struct ral_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
|
||||
|
||||
if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
|
||||
k = ieee80211_crypto_encap(ic, ni, m0);
|
||||
if (k == NULL)
|
||||
if (k == NULL) {
|
||||
m_freem(m0);
|
||||
return ENOBUFS;
|
||||
}
|
||||
|
||||
/* packet header may have moved, reset our local pointer */
|
||||
wh = mtod(m0, struct ieee80211_frame *);
|
||||
|
@ -1202,8 +1202,10 @@ ural_tx_data(struct ural_softc *sc, struct mbuf *m0, struct ieee80211_node *ni)
|
||||
|
||||
if (wh->i_fc[1] & IEEE80211_FC1_WEP) {
|
||||
k = ieee80211_crypto_encap(ic, ni, m0);
|
||||
if (k == NULL)
|
||||
if (k == NULL) {
|
||||
m_freem(m0);
|
||||
return ENOBUFS;
|
||||
}
|
||||
|
||||
/* packet header may have moved, reset our local pointer */
|
||||
wh = mtod(m0, struct ieee80211_frame *);
|
||||
|
Loading…
Reference in New Issue
Block a user