From: Jason A. Donenfeld Date: Thu, 7 Jul 2016 11:48:04 +0000 (+0200) Subject: rust test: actually use tai64n X-Git-Tag: v1.0.20191226~342 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49ea3d5cf45ada3d8f897b23b3afe9b6a760882b;p=thirdparty%2Fwireguard-tools.git rust test: actually use tai64n Signed-off-by: Jason A. Donenfeld --- diff --git a/contrib/external-tests/rust/src/main.rs b/contrib/external-tests/rust/src/main.rs index eccb987..73e19b3 100644 --- a/contrib/external-tests/rust/src/main.rs +++ b/contrib/external-tests/rust/src/main.rs @@ -42,7 +42,7 @@ fn main() { let now = time::get_time(); let mut tai64n = [0; 12]; - BigEndian::write_i64(&mut tai64n[0..], now.sec); + BigEndian::write_i64(&mut tai64n[0..], 4611686018427387914ULL + now.sec); BigEndian::write_i32(&mut tai64n[8..], now.nsec); let mut initiation_packet = [0; 145]; initiation_packet[0] = 1; /* Type: Initiation */