Fixed Ordering::Acquire -> Ordering::SeqCst typo

This commit is contained in:
Mathias Hall-Andersen
2019-10-23 14:14:08 +02:00
parent 8107973342
commit 3e829c04d1
4 changed files with 12 additions and 8 deletions

View File

@@ -109,4 +109,6 @@ fn test_pure_wireguard() {
"192.168.2.20".parse().unwrap(), // src
"192.168.1.10".parse().unwrap(), // dst
);
fake1.write(packet_p1_to_p2);
}

View File

@@ -100,7 +100,7 @@ impl <B: bind::Bind>PeerInner<B> {
*/
pub fn sent_handshake_initiation(&self) {
*self.last_handshake.lock() = SystemTime::now();
self.handshake_queued.store(false, Ordering::Acquire);
self.handshake_queued.store(false, Ordering::SeqCst);
self.timers_any_authenticated_packet_traversal();
self.timers_any_authenticated_packet_sent();
}
@@ -150,8 +150,8 @@ impl Timers {
let peer = peer.clone();
runner.timer(move || {
info!(
"Retrying handshake with {}, because we stopped hearing back after {} seconds",
peer,
"Retrying handshake with {}, because we stopped hearing back after {} seconds",
peer,
(KEEPALIVE_TIMEOUT + REKEY_TIMEOUT).as_secs()
);
peer.new_handshake();
@@ -256,7 +256,7 @@ impl<T: tun::Tun, B: bind::Bind> Callbacks for Events<T, B> {
/* Called every time the router detects that a key is required,
* but no valid key-material is available for the particular peer.
*
*
* The message is called continuously
* (e.g. for every packet that must be encrypted, until a key becomes available)
*/