[PATCH] FT: fix the calculation of MIC Control field in FTIE
    Hong Wu 
    Hong.Wu at dspg.com
       
    Mon Jun 27 20:16:39 EDT 2011
    
    
  
 
Signed-off-by: Hong Wu <hong.wu at dspg.com>
---
 src/ap/wpa_auth_ft.c  |    2 +-
 src/rsn_supp/wpa_ft.c |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
 
diff --git a/src/ap/wpa_auth_ft.c b/src/ap/wpa_auth_ft.c
index 65f5f4c..aac1400
--- a/src/ap/wpa_auth_ft.c
+++ b/src/ap/wpa_auth_ft.c
@@ -1207,7 +1207,7 @@ u16 wpa_ft_validate_reassoc(struct
wpa_state_machine *sm, const u8 *ies,
 
      count = 3;
      if (parse.ric)
-           count++;
+           count += ieee802_11_ie_count(parse.ric, parse.ric_len);
      if (ftie->mic_control[1] != count) {
            wpa_printf(MSG_DEBUG, "FT: Unexpected IE count in MIC "
                     "Control: received %u expected %u",
diff --git a/src/rsn_supp/wpa_ft.c b/src/rsn_supp/wpa_ft.c
index da6e966..90f867c
--- a/src/rsn_supp/wpa_ft.c
+++ b/src/rsn_supp/wpa_ft.c
@@ -950,8 +950,8 @@ int wpa_ft_validate_reassoc_resp(struct wpa_sm *sm,
const u8 *ies,
      }
 
      count = 3;
-     if (parse.tie)
-           count++;
+     if (parse.ric)
+           count += ieee802_11_ie_count(parse.ric, parse.ric_len);
      if (ftie->mic_control[1] != count) {
            wpa_printf(MSG_DEBUG, "FT: Unexpected IE count in MIC "
                     "Control: received %u expected %u",
-- 
1.7.0.4
______________________________________________________________________
DSP Group, Inc. automatically scans all emails and attachments using
MessageLabs Email Security System.
_____________________________________________________________________
______________________________________________________________________
DSP Group, Inc. automatically scans all emails and attachments using
MessageLabs Email Security System.
_____________________________________________________________________
______________________________________________________________________
DSP Group, Inc. automatically scans all emails and attachments using MessageLabs Email Security System.
_____________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.shmoo.com/pipermail/hostap/attachments/20110628/2b91c95c/attachment-0001.htm 
    
    
More information about the HostAP
mailing list