Lines Matching refs:identity
167 for (const auto& [identity, server] : tmp) { in setDot()
168 if (tracker.find(identity) == tracker.end()) { in setDot()
169 tracker[identity] = server; in setDot()
173 for (auto& [identity, server] : tracker) { in setDot()
174 const bool active = tmp.find(identity) != tmp.end(); in setDot()
179 updateServerState(identity, Validation::success_but_expired, netId); in setDot()
183 updateServerState(identity, Validation::in_process, netId); in setDot()
184 startDotValidation(identity, netId, false); in setDot()
302 const ServerIdentity& identity, in requestDotValidation() argument
316 auto result = getDotServerLocked(identity, netId); in requestDotValidation()
334 updateServerState(identity, Validation::in_process, netId); in requestDotValidation()
335 startDotValidation(identity, netId, true); in requestDotValidation()
339 void PrivateDnsConfiguration::startDotValidation(const ServerIdentity& identity, unsigned netId, in startDotValidation() argument
344 const auto result = getDotServerLocked(identity, netId); in startDotValidation()
348 std::thread validate_thread([this, identity, server, netId, isRevalidation] { in startDotValidation()
376 this->recordDotValidation(identity, netId, success, isRevalidation); in startDotValidation()
396 void PrivateDnsConfiguration::sendPrivateDnsValidationEvent(const ServerIdentity& identity, in sendPrivateDnsValidationEvent() argument
399 << netId << " for " << identity.sockaddr.toString() << " with hostname {" in sendPrivateDnsValidationEvent()
400 << identity.provider << "}"; in sendPrivateDnsValidationEvent()
408 it->onPrivateDnsValidationEvent(netId, identity.sockaddr.ip().toString(), identity.provider, in sendPrivateDnsValidationEvent()
416 .ipAddress = identity.sockaddr.ip().toString(), in sendPrivateDnsValidationEvent()
417 .hostname = identity.provider, in sendPrivateDnsValidationEvent()
420 .protocol = (identity.sockaddr.port() == kDotPort) in sendPrivateDnsValidationEvent()
429 bool PrivateDnsConfiguration::recordDotValidation(const ServerIdentity& identity, unsigned netId, in recordDotValidation() argument
439 notifyValidationStateUpdate(identity.sockaddr, Validation::fail, netId); in recordDotValidation()
446 notifyValidationStateUpdate(identity.sockaddr, Validation::fail, netId); in recordDotValidation()
457 auto serverPair = tracker.find(identity); in recordDotValidation()
459 LOG(WARNING) << "Server " << identity.sockaddr.ip().toString() in recordDotValidation()
464 LOG(WARNING) << "Server " << identity.sockaddr.ip().toString() in recordDotValidation()
471 if (needReportEvent(netId, identity, success)) { in recordDotValidation()
472 sendPrivateDnsValidationEvent(identity, netId, success); in recordDotValidation()
476 updateServerState(identity, Validation::success, netId); in recordDotValidation()
483 updateServerState(identity, result, netId); in recordDotValidation()
490 void PrivateDnsConfiguration::updateServerState(const ServerIdentity& identity, Validation state, in updateServerState() argument
492 const auto result = getDotServerLocked(identity, netId); in updateServerState()
494 notifyValidationStateUpdate(identity.sockaddr, Validation::fail, netId); in updateServerState()
501 notifyValidationStateUpdate(identity.sockaddr, state, netId); in updateServerState()
503 RecordEntry record(netId, identity, state); in updateServerState()
523 base::Result<DnsTlsServer*> PrivateDnsConfiguration::getDotServer(const ServerIdentity& identity, in getDotServer() argument
526 return getDotServerLocked(identity, netId); in getDotServer()
530 const ServerIdentity& identity, unsigned netId) { in getDotServerLocked() argument
536 auto iter = netPair->second.find(identity); in getDotServerLocked()
539 identity.sockaddr.toString(), identity.provider); in getDotServerLocked()
708 const ServerIdentity identity = {IPSockAddr::toIPSockAddr(ipAddr, kDohPort), host}; in onDohStatusUpdate() local
709 if (needReportEvent(netId, identity, success)) { in onDohStatusUpdate()
710 sendPrivateDnsValidationEvent(identity, netId, success); in onDohStatusUpdate()
713 RecordEntry record(netId, identity, status); in onDohStatusUpdate()
717 bool PrivateDnsConfiguration::needReportEvent(uint32_t netId, ServerIdentity identity, in needReportEvent() argument
723 switch (identity.sockaddr.port()) { in needReportEvent()
729 if ((identity.sockaddr.ip() == id.sockaddr.ip()) && in needReportEvent()
730 (identity.sockaddr.port() != id.sockaddr.port()) && in needReportEvent()
734 << identity.sockaddr.ip().toString(); in needReportEvent()
744 if (it->second == identity && it->second.status == Validation::success) { in needReportEvent()
747 << identity.sockaddr.ip().toString(); in needReportEvent()