From: Jouni Malinen Date: Wed, 10 Nov 2010 14:59:45 +0000 (+0200) Subject: wlantest: Fix BIP replay detection X-Git-Tag: hostap-1-bp~857 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d4c29158d5e5170041bf85f8a7a76fe8113966c;p=thirdparty%2Fhostap.git wlantest: Fix BIP replay detection --- diff --git a/wlantest/rx_mgmt.c b/wlantest/rx_mgmt.c index 19d478eaf..039d85d45 100644 --- a/wlantest/rx_mgmt.c +++ b/wlantest/rx_mgmt.c @@ -509,7 +509,7 @@ static int check_bip(struct wlantest *wt, const u8 *data, size_t len) return 0; } - if (os_memcmp(mmie + 2, bss->ipn[keyid], 6) >= 0) { + if (os_memcmp(mmie + 2, bss->ipn[keyid], 6) <= 0) { wpa_printf(MSG_INFO, "BIP replay detected: SA=" MACSTR, MAC2STR(mgmt->sa)); wpa_hexdump(MSG_INFO, "RX IPN", mmie + 2, 6);