Skip to content

Commit 0a54917

Browse files
kilroydlinvjw
authored andcommitted
orinoco: fix TKIP countermeasure behaviour
Enable the port when disabling countermeasures, and disable it on enabling countermeasures. This bug causes the response of the system to certain attacks to be ineffective. It also prevents wpa_supplicant from getting scan results, as wpa_supplicant disables countermeasures on startup - preventing the hardware from scanning. wpa_supplicant works with ap_mode=2 despite this bug because the commit handler re-enables the port. The log tends to look like: State: DISCONNECTED -> SCANNING Starting AP scan for wildcard SSID Scan requested (ret=0) - scan timeout 5 seconds EAPOL: disable timer tick EAPOL: Supplicant port status: Unauthorized Scan timeout - try to get results Failed to get scan results Failed to get scan results - try scanning again Setting scan request: 1 sec 0 usec Starting AP scan for wildcard SSID Scan requested (ret=-1) - scan timeout 5 seconds Failed to initiate AP scan. Reported by: Giacomo Comes <comes@naic.edu> Signed-off by: David Kilroy <kilroyd@googlemail.com> Cc: stable@kernel.org Signed-off-by: John W. Linville <linville@tuxdriver.com>
1 parent ba34fce commit 0a54917

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/wireless/orinoco

1 file changed

+2
-2
lines changed

drivers/net/wireless/orinoco/wext.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,10 +911,10 @@ static int orinoco_ioctl_set_auth(struct net_device *dev,
911911
*/
912912
if (param->value) {
913913
priv->tkip_cm_active = 1;
914-
ret = hermes_enable_port(hw, 0);
914+
ret = hermes_disable_port(hw, 0);
915915
} else {
916916
priv->tkip_cm_active = 0;
917-
ret = hermes_disable_port(hw, 0);
917+
ret = hermes_enable_port(hw, 0);
918918
}
919919
break;
920920

0 commit comments

Comments
 (0)