wgengine/magicsock: adapt to wireguard-go without UpdateDst

22507adf54 stopped relying on
our fork of wireguard-go's UpdateDst callback.
As a result, we can unwind that code,
and the extra return value of ReceiveIPv{4,6}.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder
2021-01-14 18:06:08 -08:00
committed by Josh Bleecher Snyder
parent 23c2dc2165
commit 63af950d8c
4 changed files with 16 additions and 44 deletions

View File

@@ -352,7 +352,7 @@ func TestNewConn(t *testing.T) {
go func() {
var pkt [64 << 10]byte
for {
_, _, _, err := conn.ReceiveIPv4(pkt[:])
_, _, err := conn.ReceiveIPv4(pkt[:])
if err != nil {
return
}
@@ -1440,13 +1440,12 @@ func BenchmarkReceiveFrom(b *testing.B) {
if _, err := sendConn.WriteTo(sendBuf, dstAddr); err != nil {
b.Fatalf("WriteTo: %v", err)
}
n, ep, addr, err := conn.ReceiveIPv4(buf)
n, ep, err := conn.ReceiveIPv4(buf)
if err != nil {
b.Fatal(err)
}
_ = n
_ = ep
_ = addr
}
}