mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
1cf85822d0
Not yet used. This is being made available so magicsock/wgengine can use it to ignore certain sends (UDP + DERP) later on at least mobile, letting wireguard-go think it's doing its full attempt schedule, but we can cut it short conditionally based on what we know from the control plane. Updates #7617 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com> Change-Id: Ia367cf6bd87b2aeedd3c6f4989528acdb6773ca7
27 lines
627 B
Go
27 lines
627 B
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
package wgint
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/tailscale/wireguard-go/device"
|
|
)
|
|
|
|
func TestInternalOffsets(t *testing.T) {
|
|
peer := new(device.Peer)
|
|
if got := PeerLastHandshakeNano(peer); got != 0 {
|
|
t.Errorf("PeerLastHandshakeNano = %v, want 0", got)
|
|
}
|
|
if got := PeerRxBytes(peer); got != 0 {
|
|
t.Errorf("PeerRxBytes = %v, want 0", got)
|
|
}
|
|
if got := PeerTxBytes(peer); got != 0 {
|
|
t.Errorf("PeerTxBytes = %v, want 0", got)
|
|
}
|
|
if got := PeerHandshakeAttempts(peer); got != 0 {
|
|
t.Errorf("PeerHandshakeAttempts = %v, want 0", got)
|
|
}
|
|
}
|