Added ForceSendHandshakeInitiation
This commit is contained in:
parent
e08a078588
commit
936f61d05b
2 changed files with 9 additions and 0 deletions
|
@ -621,6 +621,12 @@ void WireguardProcessor::RunAllMainThreadScheduled() {
|
|||
}
|
||||
}
|
||||
|
||||
void WireguardProcessor::ForceSendHandshakeInitiation(WgPeer *peer) {
|
||||
peer->last_handshake_init_timestamp_ -= REKEY_TIMEOUT_MS;
|
||||
peer->total_handshake_attempts_ = 0;
|
||||
SendHandshakeInitiation(peer);
|
||||
}
|
||||
|
||||
void WireguardProcessor::SendHandshakeInitiation(WgPeer *peer) {
|
||||
assert(dev_.IsMainThread());
|
||||
|
||||
|
|
|
@ -111,6 +111,9 @@ public:
|
|||
TunInterface::PrePostCommands &prepost() { return pre_post_; }
|
||||
const std::vector<WgCidrAddr> &addr() { return addresses_; }
|
||||
void RunAllMainThreadScheduled();
|
||||
|
||||
void ForceSendHandshakeInitiation(WgPeer *peer);
|
||||
|
||||
private:
|
||||
void DoWriteUdpPacket(Packet *packet);
|
||||
void WriteAndEncryptPacketToUdp_WillUnlock(WgPeer *peer, Packet *packet);
|
||||
|
|
Loading…
Reference in a new issue