Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/SagerNet/wireguard-go

Mirror only. Official repository is at https://git.zx2c4.com/wireguard-go
https://github.com/SagerNet/wireguard-go

device: make RoutineReadFromTUN keep encryption queue alive

RoutineReadFromTUN can trigger a call to SendStagedPackets.
SendStagedPackets attempts to protec...

4eab21a7b7192dc806a3d60c46827866fc8942fe authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
conn: try harder to have v4 and v6 ports agree

Signed-off-by: Jason A. Donenfeld <[email protected]>

30b96ba083e4ef61051f125770b50bd278712539 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: only allocate peer queues once

This serves two purposes.

First, it makes repeatedly stopping then starting a peer cheaper.
Sec...

78ebce69324e241d462d624cae389396db9dbd94 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: clarify device.state.state docs (again)

Signed-off-by: Josh Bleecher Snyder <[email protected]>

cae090d116d4aa61494f5951a9d6ab6902017dce authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: run fewer iterations in TestUpDown

The high iteration count was useful when TestUpDown
was the nexus of new bugs to investigate.

N...

465261310b55898c3f67809bd56d58442bca4554 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: run fewer trials in TestWaitPool when race detector enabled

On a many-core machine with the race detector enabled,
this test can take several minutes to com...

d117d42ae74d276cd986337d218bd9f4220c789e authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove nil elem check in finalizers

This is not necessary, and removing it speeds up detection of UAF bugs.

Signed-off-by: Josh Ble...

ecceaadd168ce682695acf1a5c004ef89e4927eb authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: rename unsafeRemovePeer to removePeerLocked

This matches the new naming scheme of upLocked and downLocked.

Signed-off-by: Jason A. Donenfel...

9e728c2eb07e9d551bef2bcb3681ea0afc2dd1a0 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: remove deviceStateNew

It's never used and we won't have a use for it. Also, move to go-running
stringer, for those wit...

eaf664e4e9134ab7d5100d7284274a821122fbbc authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: remove listen port race in tests

Signed-off-by: Jason A. Donenfeld <[email protected]>

6548a682a9a06cf7041e25f7aa5ac57f1f4cf3b4 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: do not attach finalizer to non-returned object

Before, the code attached a finalizer to an object that wasn't returned,
resulting in immediate ...

6ac1240821207c90708ac205f4f98eb8b82f3ee5 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: do not log on idempotent device state change

Part of being actually idempotent is that we shouldn't penalize code
that takes advantage of thi...

d6e76fdbd6bae64a08662eb19d3634adb4881155 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: fix typo in comment

Signed-off-by: Jason A. Donenfeld <[email protected]>

02138f1f8185c0b578a7b57122f59d9c9681f64b authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: lock elem in autodraining queue before freeing

Without this, we wind up freeing packets that the encryption/decryption
queues still have, resul...

4b5d15ec2b1f148b4f718ed16d7e7f022b19fe1b authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: fix alignment on 32-bit machines and test for it

The test previously checked the offset within a substruct, not the
offset within the allocated s...

d7bc7508e57d6227646f6aa81e5393a41a904518 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: fix comment typo and shorten state.mu.Lock to state.Lock

Signed-off-by: Jason A. Donenfeld <[email protected]>

a816e8511eb45975e8e0e4199c3481989953fd56 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: generate test keys on the fly

Signed-off-by: Jason A. Donenfeld <[email protected]>

a60e6dab76f1e2ff44d77e75df02f76c3f66e1ca authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: remove mutex from Peer send/receive

The immediate motivation for this change is an observed deadlock.

1. A goroutine calls peer.Sto...

d8dd1f254fc42878970d764b046ec5789ab30259 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: create channels.go

We have a bunch of stupid channel tricks, and I'm about to add more.
Give them their own file. T...

57aadfcb14776a792e629dd7c22be066b7e2ed20 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: print direction when ping transit fails

Signed-off-by: Josh Bleecher Snyder <[email protected]>

af408eb9400bd94a01eea5ece8fa3da62c911818 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove device.state.stopping from RoutineTUNEventReader

The TUN event reader does three things: Change MTU, device up, and device down.
Changing the MTU...

3516ccc1e226756c4ba6d431cbf7e3a3fe63c5f8 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: don't track device interface state in RoutineTUNEventReader

We already track this state elsewhere. No need to duplicate.
The cost of calling changeState is ...

d840445e9bdd4f4db3538c9caf93d797cc987fbc authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: separate timersInit from timersStart

timersInit sets up the timers.
It need only be done once per peer.

timersStart does the work to...

15810daa2283e3cfe0c811c3632f053274f31950 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: improve MTU change handling

The old code silently accepted negative MTUs.
It also set MTUs above the maximum.
It also had ha...

675ff32e6c29b4547e854c73b6aa6fdabe2cd0f5 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: overhaul device state management

This commit simplifies device state management.
It creates a single unified state variable and d...

0bcb822e5b4ee6408c5bcb5ad4d4e61b394a834e authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove unnecessary zeroing in peer.SendKeepalive

elem.packet is always already nil.

Signed-off-by: Josh Bleecher Snyder <[email protected]>

da956772030b8b1fcbd37f82f08863070c93aa0f authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove device.state.stopping from RoutineHandshake

It is no longer necessary.

Signed-off-by: Josh Bleecher Snyder <[email protected]>

9c75f58f3d8656e9e5394959a67b630f51f9dc98 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove device.state.stopping from RoutineDecryption

It is no longer necessary, as of 454de6f3e64abd2a7bf9201579cd92eea5280996
(device: use channel c...

84a42aed63c1bb2c6de0774dc568ab1c77a22b33 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
main: add back version file

Signed-off-by: Jason A. Donenfeld <[email protected]>

4192036acd3b6442a60a5852b78979dde4b53ba5 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
tai64n: add string representation for error messages

Signed-off-by: Jason A. Donenfeld <[email protected]>

9c7bd73be2cc7b706d471cd34d718852457e8cef authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: take peer handshake when reinitializing last sent handshake

This papers over other unrelated races, unfortunately.

Signed-off-by: Jason A. Donenfeld <Jason...

01e176af3c2b36c7da3bfd8f92f7f578ecd4fbd6 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: fix goroutine leak test

The leak test had rare flakes.
If a system goroutine started at just the wrong moment, you'd get...

91617b4c522eaa034d39b208edc8221ba52e0954 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: add up/down stress test

Signed-off-by: Jason A. Donenfeld <[email protected]>

7258a8973dfb2e3069fe1a8364966cfaadbdb4e1 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: pass cfg strings around in tests instead of reader

This makes it easier to tag things onto the end manually for quick hacks.

Signed-off-by: Jason ...

d9d547a3f3f83f6ea23e140e3665ac41b6aca10a authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: benchmark the waitpool to compare it to the prior channels

Here is the old implementation:

type WaitPool struct {
c chan interface{}
}

...

c3bde5f59099a3b21b016bf809b83ee3de126f80 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: test that we do not leak goroutines

Signed-off-by: Josh Bleecher Snyder <[email protected]>

fd63a233c9fedad2be4e26edbc540e11d9ea5968 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: tie encryption queue lifetime to the peers that write to it

Signed-off-by: Josh Bleecher Snyder <[email protected]>

8a374a35a0fe62dfd86df2c16166d2bb84115b93 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: use a waiting sync.Pool instead of a channel

Channels are FIFO which means we have guaranteed cache misses.

Signed-off-by: Jason A. Donenfel...

48460703229d73fbacdd0d6b0d0f01a54f7ce751 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: reduce number of append calls when padding

Signed-off-by: Jason A. Donenfeld <[email protected]>

a9f80d8c587df99c6e8f57704aef3fe1ac62d0db authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: use int64 instead of atomic.Value for time stamp

Signed-off-by: Jason A. Donenfeld <[email protected]>

de51129e33a5fe4fad3da172539e9be640d39211 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: use new model queues for handshakes

Signed-off-by: Jason A. Donenfeld <[email protected]>

beb25cc4fd31da09590fed3200628baf4c701f8b authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: simplify peer queue locking

Signed-off-by: Jason A. Donenfeld <[email protected]>

9263014ed3f0a97800c893cb7346cc5109fc9e27 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: reduce nesting when staging packet

Suggested-by: Josh Bleecher Snyder <[email protected]>
Signed-off-by: Jason A. Donenfeld <Jason...

f0f27d7fd242587ccb966c6d2e074dafe5ab7349 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
global: bump copyright

Signed-off-by: Jason A. Donenfeld <[email protected]>

d4112d9096f4bdd68f1a109bb12df82f5f4ca5a0 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: remove version string

This is what modules are for, and Go binaries can introspect.

Signed-off-by: Jason A. Donenfeld...

bf3bb888512e74bee0b79bd38826cb019ca2a0ee authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: do not allow get to run while set runs

Signed-off-by: Jason A. Donenfeld <[email protected]>

6a128dde71d925fd4865ebd86855213a429b4729 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: avoid hex allocations in IpcGet

benchmark old ns/op new ns/op delta
BenchmarkUAPIGet-16 2872 ...

34c047c762c31911333833c56a6dc50c52c84f5f authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: the psk is not a chapoly key

It's a separate type of key that gets hashed into the chain.

Signed-off-by: Jason A. Donenfeld ...

d4725bc45685187088c84234a6d2be396a1373e5 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: get rid of nonce routine

This moves to a simple queue with no routine processing it, to reduce
scheduler pressure.

This ...

1b092ce584cbee0f86f3e25b5498870c8ca96652 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
tun: use %w for errors on linux

Signed-off-by: Jason A. Donenfeld <[email protected]>

a11dec5dc12255ee032ce730eef3c82e77c84ed2 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: avoid deadlock when changing private key and removing self peers

Signed-off-by: Jason A. Donenfeld <[email protected]>

ace50a0529bdd69f32f637ee84845bde45de07b6 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: use linked list for per-peer allowed-ip traversal

This makes the IpcGet method much faster.

We also refactor the traversal API to use a callback ...

8cc99631d025f5013e40f8a5a7b3370bff1c577e authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: combine debug and info log levels into 'verbose'

There are very few cases, if any, in which a user only wants one of
these levels, so combine it ...

d669c78c4306290963415568f4a64a1ae2b35b20 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: change logging interface to use functions

This commit overhauls wireguard-go's logging.

The primary, motivating change is to use a functi...

7139279cd0b08ebbd2c0322bc01d5678aa00cd0e authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: fix shadowing of err in IpcHandle

The declaration of err in

nextByte, err := buffered.ReadByte

shadows the declaration of err i...

37efdcaccfb16e47137728b5462c90d0b2ae8460 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove extra error arg

Caught by go vet.
Signed-off-by: Josh Bleecher Snyder <[email protected]>

d3a2b74df28ea7d7e90918c4431a38853990ce72 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: reduce allocs in Device.IpcGetOperation

Plenty more to go, but a start:

name old time/op new time/op delta
UAPIGet-4 6.3...

8114c9db5ffc8c63e7f58eb06228ddad4ee2e1c3 authored almost 4 years ago by Brad Fitzpatrick <[email protected]>
device: add benchmark for UAPI Device.IpcGetOperation

Signed-off-by: Josh Bleecher Snyder <[email protected]>

e6ec3852a93c95ac55662cc34a25b71a84c6e7b0 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
conn: fix interface parameter name in Bind interface docs

Signed-off-by: Brad Fitzpatrick <[email protected]>

23b2790aa06270485f3d951132609afaeb888c28 authored almost 4 years ago by Brad Fitzpatrick <[email protected]>
ipc: add missing Windows errno

Signed-off-by: Jason A. Donenfeld <[email protected]>

a29767dda6db9811b547ceec593a7170dc33bd31 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: allow pipelining UAPI requests

The original spec ends with \n\n especially for this reason.

Signed-off-by: Jason A. Donenfeld ...

18e47795e598973195887893e7d77baddec53ebb authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: serialize access to IpcSetOperation

Interleaves IpcSetOperations would spell trouble.

Signed-off-by: Josh Bleecher Snyder <josh@tai...

cecb41515d780213fd6b37bd04686f5296edf84c authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: simplify handling of IPC set endpoint

Signed-off-by: Josh Bleecher Snyder <[email protected]>

a9ce4b762cd8b9898ff69571194ad3f09ad6d7bd authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove close processing fwmark

Also, a behavior change: Stop treating a blank value as 0.
It's not in the spec.

Signed-off-by:...

d8f2cc87ee66958226157c5bb77464eee23156c2 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove unnecessary comment

Signed-off-by: Josh Bleecher Snyder <[email protected]>

2b8665f5f973cd0b36722ba0a8689b91b99eec7d authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: introduce new IPC error message for unknown error

Signed-off-by: Josh Bleecher Snyder <[email protected]>

674a4675a10ea7eb83fad2eada5bf7211c7575f3 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: correct IPC error number for I/O errors

Signed-off-by: Josh Bleecher Snyder <[email protected]>

87bdcb2ae472711c3b0b3679fbdb393e39b4dbc3 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: split IpcSetOperation into parts

The goal of this change is to make the structure
of IpcSetOperation easier to follow.

IpcSetOpe...

6252de0db9331cbc20074e9d40165266b5816148 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: simplify IpcHandle error handling

Unify the handling of unexpected UAPI errors.
The comment that says "should never happen" is inc...

37a239e7360dd38e513fd7d717ce50de6d8215ff authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: return errors from ipc scanner

The code as written will drop any read errors on the floor.
Fix that.

Signed-off-by: Josh Bleec...

675aae24232750e5a41c0a10bb1195fa4bb63d42 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: expand IPCError

Expand IPCError to contain a wrapped error,
and add a helper to make constructing such errors ea...

a029b942ae25be8ea31a4945198617c76c31abcd authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove dead code

If device.NewPeer returns a nil error,
then the returned peer is always non-nil.

Signed-off-by:...

db3fa1409cae2113df73f1641d9fb1830fbcc696 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
netstack: further sequester with own go.mod and go.sum

In order to avoid even the flirtation with passing on these dependencies
to ordinary consumers o...

fcc8ad05df75d73f10f9aaa1c468a11a66a48f87 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
netstack: introduce new module for gvisor tcp tun adapter

The Go linker isn't smart enough to prevent gvisor from being pulled
into modules that use other...

1d4eb2727a3ad6086229f45354933e84d85fc4e3 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: allow compiling with Go 1.15

Until we depend on Go 1.16 (which isn't released yet), alias our own
variable to the private mem...

294d3bedf959c9c496aaa877919a762acf07c684 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: remove unused trie test code

Signed-off-by: Josh Bleecher Snyder <[email protected]>

6a2ecb581b5940ab82814fe836cb599705da9b8a authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove unused fields from DummyDatagram and DummyBind

Signed-off-by: Josh Bleecher Snyder <[email protected]>

86a58b51c027feb3bf8836359fb3adf1c436c53d authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
tun: fix fmt.Errorf format strings

Type tcpip.Error is not an error.

I've filed https://github.com/google/gvisor/issues/5314
to fi...

b00b2c29514549b6ec1f04b788191a9eabf4e723 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
conn: remove _ method receiver

Minor style fix.

Signed-off-by: Josh Bleecher Snyder <[email protected]>

f07177c762bfc4aab7d44a4b32432b8575007bec authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove unnecessary zeroing

Newly allocated objects are already zeroed.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale...

7c5d1e355e6faa1551296c34aaced4ffe0b16d87 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove QueueInboundElement.dropped

Now that we block when enqueueing to the decryption queue,
there is only one case in which we "d...

a86492a5673983fe7755631996a23c2dc510808f authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove QueueOutboundElement.dropped

If we block when enqueuing encryption elements to the queue,
then we never drop them.

Signed-of...

7ee95e053c280796ecfb5533000915e7daa13f69 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
tun/wintun/memmod: gofmt

Signed-off-by: Josh Bleecher Snyder <[email protected]>

291dbcf1f0424f053d2fc52341590be264b8f47d authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
tun/wintun/memmod: fix format verb

Caught by 'go vet'.

Signed-off-by: Josh Bleecher Snyder <[email protected]>

abc88c82b13b6bf4cb1592ba4f7de58079c557cd authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: check returned errors from NewPeer in TestNoiseHandshake

Signed-off-by: Josh Bleecher Snyder <[email protected]>

23642a13bed48c700144e4b346d054b8e47879a8 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove selects from encrypt/decrypt/inbound/outbound enqueuing

Block instead. Backpressure here is fine, probably preferable.
This reduces code complexity.

Si...

2fe19ce54db258d8c47ff03d8335fd28c7c7ad0f authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: put handshake buffer in pool in FlushPacketQueues

This appears to have been an oversight.

Signed-off-by: Josh Bleecher Snyder <[email protected]>

0cc15e7c7c6fc2917cb1cea8ea3f10f7d375cac4 authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
device: use channel close to shut down and drain decryption channel

This is similar to commit e1fa1cc5560020e67d33aa7e74674853671cf0a0,
but for the decryption chann...

48c3b87eb824deb1cb3178a7cdd42276dbc70d2d authored almost 4 years ago by Josh Bleecher Snyder <[email protected]>
tun: add tcpip stack tunnel abstraction

This allows people to initiate connections over WireGuard without any
underlying operating syste...

675955de5d0a1bad66cd7e99671b031fbce8f589 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
device: receive: do not exit immediately on transient UDP receive errors

Some users report seeing lines like:

> Routine: receive incoming IPv4 - stopped

Popping up une...

ea6c1cd7e6525f76041d341074a0e10b800d4e13 authored almost 4 years ago by Jason A. Donenfeld <[email protected]>
conn: linux: do not allow ReceiveIPvX to race with Close

If Close is called after ReceiveIPvX, then ReceiveIPvX will block on an
invalid or potentially r...

3b3de758ec898e47aef609fbf16d78e97dac2000 authored about 4 years ago by Jason A. Donenfeld <[email protected]>
device: receive: drain decryption queue before exiting RoutineDecryption

It's possible for RoutineSequentialReceiver to try to lock an elem after
RoutineDecryption has e...

29b04775856b62213d7bc01937641e2db081d707 authored about 4 years ago by Jason A. Donenfeld <[email protected]>
device: remove starting waitgroups

In each case, the starting waitgroup did nothing but ensure
that the goroutine has launched.

No...

c9e4a859ae8cdd7046a467afe8b50c5364c2cfc7 authored about 4 years ago by Josh Bleecher Snyder <[email protected]>
device: increase timeout in tests

When running many concurrent test processing using
https://godoc.org/golang.org/x/tools/cmd/stre...

db1edc7e915635dfd31554f8f9a80d6e20740926 authored about 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove unnecessary zeroing

Signed-off-by: Josh Bleecher Snyder <[email protected]>

d0f8e9477c14a1c92f84beb46cd17b91c56fae44 authored about 4 years ago by Josh Bleecher Snyder <[email protected]>
device: call wg.Add outside the goroutine

One of the first rules of WaitGroups is that you call wg.Add
outside of a goroutine, not inside ...

b42e32047d16cc4389ef63550e525c7b08320172 authored about 4 years ago by Josh Bleecher Snyder <[email protected]>
device: use channel close to shut down and drain encryption channel

The new test introduced in this commit used to deadlock about 1% of the time.

I believe that th...

e1fa1cc5560020e67d33aa7e74674853671cf0a0 authored about 4 years ago by Josh Bleecher Snyder <[email protected]>
device: make test setup more robust

Picking two free ports to use for a test is difficult.
The free port we selected might no longer...

3591acba76d30ea7986ff5828cefcd7d8f705be2 authored about 4 years ago by Josh Bleecher Snyder <[email protected]>
device: remove QueueInboundElement leak with stopped peers

This is particularly problematic on mobile,
where there is a fixed number of elements.
If most o...

b5f966ac2439df9eba182886406f6381934948ad authored about 4 years ago by Josh Bleecher Snyder <[email protected]>
tun: make customization of WintunPool and requested GUID more obvious

Persnickety consumers can now do:

func init() {
tun.WintunPool, _ = wintun.MakePool...

d664444928f91c01a2c7583fdb58983c308e9b4d authored about 4 years ago by Jason A. Donenfeld <[email protected]>