Skip to content

Commit 04ffd41

Browse files
committed
vet: unused var, fns in wgconn
1 parent f87b287 commit 04ffd41

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

intra/ipn/wg/wgconn.go

-15
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import (
4040

4141
const maxbindtries = 50
4242
const wgtimeout = 60 * time.Second
43-
const useWarpClientID = true
4443

4544
// github.com/WireGuard/wireguard-go/blob/19ac233cc6/wireguard/device/send.go#L96
4645
var (
@@ -55,7 +54,6 @@ var (
5554
/*11-15*/ 0x00, 0x00, 0x00, 0x00, // fieldNonce
5655
/*16-17*/ 0x44, 0xD0, // ???
5756
}
58-
reservedZeros = []byte{0x00, 0x00, 0x00}
5957
)
6058

6159
const (
@@ -475,19 +473,6 @@ func (s *StdNetBind) flood(c *net.UDPConn, dst netip.AddrPort, why floodkind) (i
475473
})
476474
}
477475

478-
func isReservedOverwitten(b []byte) bool {
479-
if !useWarpClientID {
480-
return false
481-
}
482-
483-
if n := len(b); n == 3 { // client-id
484-
return b[0] != 0 || b[1] != 0 || b[2] != 0
485-
} else if n > 3 { // wg message
486-
return b[1] != 0 || b[2] != 0 || b[3] != 0
487-
}
488-
return false
489-
}
490-
491476
func (s *StdNetBind) BatchSize() int {
492477
return 1
493478
}

0 commit comments

Comments
 (0)