mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-12-01 19:58:22 -05:00
fa67debf4c
Relational operators (==) have higher precedence than the ternary conditional in C. The last_subtype check for association/reassociation was broken due to incorrect assumption about the precedence. Fix this by adding parenthesis around the ternary conditional. The previous implementation worked for Association Request frames by accident since WLAN_FC_STYPE_ASSOC_REQ happens to have value 0 and when the last receive frame was an Association Request frame, the sta->last_subtype == reassoc check was true and non-zero WLAN_FC_STYPE_REASSOC_REQ was interpreted as true. However, this was broken for Reassociation Request frame. reassoc == 1 in that case could have matched received Association Response frame (subtype == 1), but those are not received in AP mode and as such, this did not break other behavior apart from not being able to drop duplicated Reassociation Request frames. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com> |
||
---|---|---|
.. | ||
ap | ||
common | ||
crypto | ||
drivers | ||
eap_common | ||
eap_peer | ||
eap_server | ||
eapol_auth | ||
eapol_supp | ||
fst | ||
l2_packet | ||
p2p | ||
pae | ||
radius | ||
rsn_supp | ||
tls | ||
utils | ||
wps | ||
lib.rules | ||
Makefile |