New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 676864 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Replace (incomplete) heuristics for bad passphrase detection with error-code from supplicant

Project Member Reported by kirtika@google.com, Dec 24 2016

Issue description

Shill currently uses heuristics to determine if the error is a bad passphrase.
This results in a UI notification for bad password only if (a) we have never connected to that network before or if we fail more than a threshold (3) # of attempts. 
We should be using the supplicant state and reason code-  if state is 4WayHandshake and reason code is PREV_AUTH_NOT_VALID, use that to set shill's error correctly and get the right UI notification (kErrorBadPassphrase). 


bool WiFi::SuspectCredentials(
    WiFiServiceRefPtr service, Service::ConnectFailure* failure) const {
  if (service->IsSecurityMatch(kSecurityPsk)) {
    if (supplicant_state_ == WPASupplicant::kInterfaceState4WayHandshake &&
        service->AddSuspectedCredentialFailure()) {
      if (failure) {
        *failure = Service::kFailureBadPassphrase;
      }
      return true;
    }
  } else if (service->IsSecurityMatch(kSecurity8021x)) {
    if (eap_state_handler_->is_eap_in_progress() &&
        service->AddSuspectedCredentialFailure()) {
      if (failure) {
        *failure = Service::kFailureEAPAuthentication;
      }
      return true;
    }
  }

  return false;
}

bool WiFiService::AddSuspectedCredentialFailure() {
  if (!has_ever_connected()) {
    return true;
  }
  ++suspected_credential_failures_;
  return suspected_credential_failures_ >= kSuspectedCredentialFailureThreshold;
}

Filed based on feedback report: https://feedback.corp.google.com/product/208/neutron?lView=rd&lReport=50653162073


 

Comment 1 by yoshi@chromium.org, Jan 3 2018

Cc: -yoshi@chromium.org

Sign in to add a comment