int ieee80211_crypto_handle_keymiss(struct ieee80211com *ic,
                                    wbuf_t wbuf,
                                    struct ieee80211_rx_status *rs)
{
    struct ieee80211_node *ni = NULL;

    /*   
     * Handle packets with keycache miss
     */
    if ((rs->rs_flags & IEEE80211_RX_KEYMISS)) {
        ni = ieee80211_find_rxnode(ic,
                (const struct ieee80211_frame_min *) wbuf_header(wbuf));

        if( ni != NULL) {
            struct ieee80211vap *vap = ni->ni_vap;

            ieee80211_key_update_begin(vap);
            if (!ieee80211_crypto_keymiss(ni, wbuf, rs)) {
	            IEEE80211_DPRINTF(vap, IEEE80211_MSG_CRYPTO, "%s: Couldn't decrypt, dropping packet.\n",
                                             __func__);
                wbuf_free(wbuf);
                ieee80211_key_update_end(vap);
                ieee80211_free_node(ni); 	
                return 1;
            }else {
                ieee80211_key_update_end(vap);
                ieee80211_free_node(ni);
            }
        }
    }
	return 0;
}
Esempio n. 2
0
/*
 * Clear the global key table.
 */
void
ieee80211_crypto_delglobalkeys(struct ieee80211vap *vap)
{
	int i;

	ieee80211_key_update_begin(vap);
	for (i = 0; i < IEEE80211_WEP_NKID; i++)
		(void) _ieee80211_crypto_delkey(vap, &vap->iv_nw_keys[i]);
	ieee80211_key_update_end(vap);
}
Esempio n. 3
0
/*
 * Remove the specified key.
 */
int
ieee80211_crypto_delkey(struct ieee80211vap *vap, struct ieee80211_key *key)
{
	int status;

	ieee80211_key_update_begin(vap);
	status = _ieee80211_crypto_delkey(vap, key);
	ieee80211_key_update_end(vap);
	return status;
}
Esempio n. 4
0
/*
 * Clear the global key table.
 */
void
ieee80211_crypto_delglobalkeys(struct ieee80211com *ic)
{
	int i;

	ieee80211_key_update_begin(ic);
	for (i = 0; i < IEEE80211_WEP_NKID; i++)
		(void) _ieee80211_crypto_delkey(ic, &ic->ic_nw_keys[i]);
	ieee80211_key_update_end(ic);
}
Esempio n. 5
0
/*
 * Remove the specified key.
 */
int
ieee80211_crypto_delkey(struct ieee80211com *ic, struct ieee80211_key *key)
{
	int status;

	ieee80211_key_update_begin(ic);
	status = _ieee80211_crypto_delkey(ic, key);
	ieee80211_key_update_end(ic);
	return status;
}
Esempio n. 6
0
/*
 * Remove the specified key.
 */
int
ieee80211_crypto_delkey(struct ieee80211vap *vap, struct ieee80211_key *key, 
	struct ieee80211_node *ni)
{
	int status;

#ifdef ATH_SUPERG_COMP
	/* if valid node entry is present cleanup the compression state */
	if (ni)
		dev_comp_set(vap, ni, 0);
#endif
	ieee80211_key_update_begin(vap);
	status = _ieee80211_crypto_delkey(vap, key, ni);
	ieee80211_key_update_end(vap);

	return status;
}