Patch for replay error in AHDEMO mode madwifi

Kees-Jan Hermans hermans
Tue Oct 30 07:25:37 PDT 2012


Hello,

Madwifi can be used to have an ad-hoc crypto mode, using WPA and no key
management. This is, as far as I know, the only way to use
wpa_supplicant in ad-hoc mode and have some crypto. Alternatives are
ad-mode in plain-text or no ad-hoc mode at all. However, the method
above causes replay messages to appear (and hosts not working) when a
third host is added to the mesh. To fix this, the patch below, I
believe, shuts down the replay check.

Sincerely,

KJ

diff -u -r madwifi-0.9.4-r4178-20120131/net80211/ieee80211_crypto_tkip.c
madwifi-changes/net80211/ieee80211_crypto_tkip.c
--- madwifi-0.9.4-r4178-20120131/net80211/ieee80211_crypto_tkip.c
2011-02-02 22:22:31.000000000 +0100
+++ madwifi-changes/net80211/ieee80211_crypto_tkip.c    2012-10-30
11:42:19.442439586 +0100
@@ -297,6 +297,7 @@
                tid = ((struct ieee80211_qosframe *)wh)->i_qos[0] &
IEEE80211_QOS_TID;
 
        ctx->rx_rsc = READ_6(ivp[2], ivp[0], ivp[4], ivp[5], ivp[6],
ivp[7]);
+/*
        if (ctx->rx_rsc <= k->wk_keyrsc[tid]) {
                /*
                 * Replay violation; notify upper layer.
@@ -305,6 +306,7 @@
                vap->iv_stats.is_rx_tkipreplay++;
                return 0;
        }
+*/
        /*
         * NB: We can't update the rsc in the key until MIC is verified.
         *




More information about the Hostap mailing list