Patch for replay error in AHDEMO mode madwifi

Douglas Diniz dgdiniz
Tue Oct 30 08:13:53 PDT 2012


This is an old problem. Openwrt has a patch for this. What you did also
remove replay from AP/Client, what is not required. Check this:

http://projects.qi-hardware.com/index.php/p/openwrt-xburst/source/tree/203384ef2cc5e7fa0f0fb8626c683409e3de2338/package/madwifi/patches/458-ibss_wpa_none.patch



On Tue, Oct 30, 2012 at 12:25 PM, Kees-Jan Hermans <hermans at fox-it.com>wrote:

> 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.
>          *
>
> _______________________________________________
> HostAP mailing list
> HostAP at lists.shmoo.com
> http://lists.shmoo.com/mailman/listinfo/hostap
>



-- 
-------------------------------------------------------------------
Douglas Gameiro Diniz
Engenheiro de Computa??o - 2003 - UNICAMP

Mobile: (19) 92158777
Gtalk: dgdiniz
Msn: thedougdiniz at hotmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20121030/acb0fcd6/attachment.htm 



More information about the Hostap mailing list