<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-go, branch js/sample-api</title>
<subtitle>Go implementation of WireGuard</subtitle>
<id>https://git.zx2c4.com/wireguard-go/atom/?h=js%2Fsample-api</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-go/atom/?h=js%2Fsample-api'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/'/>
<updated>2020-12-22T19:29:28Z</updated>
<entry>
<title>device: add Device.ListenPort and Device.SetListenPort</title>
<updated>2020-12-22T19:29:28Z</updated>
<author>
<name>Josh Bleecher Snyder</name>
<email>josh@tailscale.com</email>
</author>
<published>2020-12-22T19:12:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/commit/?id=4794021bb8c697f107e6a2689bb9096eabb17888'/>
<id>urn:sha1:4794021bb8c697f107e6a2689bb9096eabb17888</id>
<content type='text'>
This is a sample commit for a possible way to make
a Go API that lives alongside UAPI.

The general idea is to add Device and Peer methods
corresponding to UAPI directives, including a way to
look up a peer from a device based on a public key,
as in UAPI.

The UAPI code then deals with parsing and generating textual
input/output, and calls the Go methods to do the work.

This commit also contains a bug fix for a racy access of device.net.port
I will send an independently commit that fixes those directly in UAPI.
This commit is NOT meant to be merged as-is.

Signed-off-by: Josh Bleecher Snyder &lt;josh@tailscale.com&gt;
</content>
</entry>
<entry>
<title>device: add UAPI helper methods</title>
<updated>2020-12-22T13:30:57Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2020-12-22T13:30:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/commit/?id=60b271ff95405de2b36ef99b64bd42516218e2e8'/>
<id>urn:sha1:60b271ff95405de2b36ef99b64bd42516218e2e8</id>
<content type='text'>
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>tun: make customization of WintunPool and WintunGUID more obvious</title>
<updated>2020-12-22T13:16:06Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2020-12-22T13:09:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/commit/?id=c27bf0bf4b5ade08c6c8b6ff679c2ec97b0186e0'/>
<id>urn:sha1:c27bf0bf4b5ade08c6c8b6ff679c2ec97b0186e0</id>
<content type='text'>
Persnickety consumers can now do:

    func init() {
        tun.WintunPool, _ = wintun.Pool("Flurp")
        tun.WintunStaticRequestedGUID, _ = windows.GUIDFromString("{5ae2716f-0b3e-4dc4-a8b5-48eba11a6e16}")
    }

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>conn: do not SO_REUSEADDR on linux</title>
<updated>2020-12-18T22:39:23Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2020-12-18T15:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/commit/?id=756958d857f868792bacdf13f4af2846d1e2bdb7'/>
<id>urn:sha1:756958d857f868792bacdf13f4af2846d1e2bdb7</id>
<content type='text'>
SO_REUSEADDR does not make sense for unicast UDP sockets.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>device: add missing colon to error line</title>
<updated>2020-12-18T19:18:47Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2020-12-18T10:52:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/commit/?id=85cb3597d05db8f7ac82460ef336563cc9d07d2d'/>
<id>urn:sha1:85cb3597d05db8f7ac82460ef336563cc9d07d2d</id>
<content type='text'>
People are actually hitting this condition, so make it uniform. Also,
change a printf into a println, to match the other conventions.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>device: fix error shadowing before log print</title>
<updated>2020-12-17T11:15:14Z</updated>
<author>
<name>Brad Fitzpatrick</name>
<email>bradfitz@tailscale.com</email>
</author>
<published>2020-09-21T22:17:16Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/commit/?id=9c4bcedf80ee12e737fb482e7972beb0b84c3361'/>
<id>urn:sha1:9c4bcedf80ee12e737fb482e7972beb0b84c3361</id>
<content type='text'>
Signed-off-by: Brad Fitzpatrick &lt;bradfitz@tailscale.com&gt;
</content>
</entry>
<entry>
<title>device: fix data race in peer.timersActive</title>
<updated>2020-12-17T00:16:26Z</updated>
<author>
<name>Josh Bleecher Snyder</name>
<email>josh@tailscale.com</email>
</author>
<published>2020-12-16T01:44:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/commit/?id=26b0dca4f569ccd1fb02fe3742cbed8595b24728'/>
<id>urn:sha1:26b0dca4f569ccd1fb02fe3742cbed8595b24728</id>
<content type='text'>
Found by the race detector and existing tests.

To avoid introducing a lock into this hot path,
calculate and cache whether any peers exist.

Signed-off-by: Josh Bleecher Snyder &lt;josh@tailscale.com&gt;
</content>
</entry>
<entry>
<title>device: fix races from changing private_key</title>
<updated>2020-12-17T00:16:26Z</updated>
<author>
<name>Josh Bleecher Snyder</name>
<email>josh@tailscale.com</email>
</author>
<published>2020-12-15T23:02:13Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/commit/?id=4bced36d327754ad9567eba450413c07ff80da72'/>
<id>urn:sha1:4bced36d327754ad9567eba450413c07ff80da72</id>
<content type='text'>
Access keypair.sendNonce atomically.
Eliminate one unnecessary initialization to zero.

Mutate handshake.lastSentHandshake with the mutex held.

Co-authored-by: David Anderson &lt;danderson@tailscale.com&gt;
Signed-off-by: Josh Bleecher Snyder &lt;josh@tailscale.com&gt;
</content>
</entry>
<entry>
<title>device: always name *Queue*Element variables elem</title>
<updated>2020-12-17T00:16:26Z</updated>
<author>
<name>Josh Bleecher Snyder</name>
<email>josh@tailscale.com</email>
</author>
<published>2020-12-16T00:00:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/commit/?id=7d88fbd2177caccef40ab60c927f9539e723903e'/>
<id>urn:sha1:7d88fbd2177caccef40ab60c927f9539e723903e</id>
<content type='text'>
They're called elem in most places.
Rename a few local variables to make it consistent.
This makes it easier to grep the code for things like elem.Drop.

Signed-off-by: Josh Bleecher Snyder &lt;josh@tailscale.com&gt;
</content>
</entry>
<entry>
<title>device: use channel close to shut down and drain outbound channel</title>
<updated>2020-12-17T00:16:26Z</updated>
<author>
<name>Josh Bleecher Snyder</name>
<email>josh@tailscale.com</email>
</author>
<published>2020-12-15T23:54:48Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-go/commit/?id=15af3e58ce918d4f68f3a85710e7252f5260d741'/>
<id>urn:sha1:15af3e58ce918d4f68f3a85710e7252f5260d741</id>
<content type='text'>
This is a similar treatment to the handling of the encryption
channel found a few commits ago: Use the closing of the channel
to manage goroutine lifetime and shutdown.
It is considerably simpler because there is only a single writer.

Signed-off-by: Josh Bleecher Snyder &lt;josh@tailscale.com&gt;
</content>
</entry>
</feed>
