[net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you're supposed to save me from this."
TODO: * drink real coffee before committing in the morning, or there's a high risk of more obviously self-evident commits being turned into attempts at humour. Reported by: cem, Coverity CID 1366219
This commit is contained in:
parent
134ede2dd2
commit
5899368a8a
@ -241,7 +241,7 @@ ccmp_decap(struct ieee80211_key *k, struct mbuf *m, int hdrlen)
|
|||||||
|
|
||||||
rxs = ieee80211_get_rx_params_ptr(m);
|
rxs = ieee80211_get_rx_params_ptr(m);
|
||||||
|
|
||||||
if ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))
|
if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))
|
||||||
goto finish;
|
goto finish;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -286,7 +286,7 @@ finish:
|
|||||||
/*
|
/*
|
||||||
* Copy up 802.11 header and strip crypto bits.
|
* Copy up 802.11 header and strip crypto bits.
|
||||||
*/
|
*/
|
||||||
if (! ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) {
|
if (! ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) {
|
||||||
ovbcopy(mtod(m, void *), mtod(m, uint8_t *) + ccmp.ic_header,
|
ovbcopy(mtod(m, void *), mtod(m, uint8_t *) + ccmp.ic_header,
|
||||||
hdrlen);
|
hdrlen);
|
||||||
m_adj(m, ccmp.ic_header);
|
m_adj(m, ccmp.ic_header);
|
||||||
@ -295,13 +295,13 @@ finish:
|
|||||||
/*
|
/*
|
||||||
* XXX TODO: see if MMIC_STRIP also covers CCMP MIC trailer.
|
* XXX TODO: see if MMIC_STRIP also covers CCMP MIC trailer.
|
||||||
*/
|
*/
|
||||||
if (! ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_MMIC_STRIP)))
|
if (! ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_MMIC_STRIP)))
|
||||||
m_adj(m, -ccmp.ic_trailer);
|
m_adj(m, -ccmp.ic_trailer);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ok to update rsc now.
|
* Ok to update rsc now.
|
||||||
*/
|
*/
|
||||||
if (! ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) {
|
if (! ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) {
|
||||||
k->wk_keyrsc[tid] = pn;
|
k->wk_keyrsc[tid] = pn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user