summaryrefslogtreecommitdiffstats
path: root/conn (follow)
Commit message (Collapse)AuthorAgeFilesLines
* conn: close old fd before trying againJason A. Donenfeld2021-02-102-0/+2
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: use errors.Is for unwrappingJason A. Donenfeld2021-02-091-16/+4
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: try harder to have v4 and v6 ports agreeJason A. Donenfeld2021-02-092-0/+14
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyrightJason A. Donenfeld2021-01-288-8/+8
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: fix interface parameter name in Bind interface docsBrad Fitzpatrick2021-01-261-1/+1
| | | | Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
* device: allow compiling with Go 1.15Jason A. Donenfeld2021-01-202-4/+17
| | | | | | | | | Until we depend on Go 1.16 (which isn't released yet), alias our own variable to the private member of the net package. This will allow an easy find replace to make this go away when we eventually switch to 1.16. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: remove _ method receiverJosh Bleecher Snyder2021-01-201-1/+1
| | | | | | Minor style fix. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
* device: receive: do not exit immediately on transient UDP receive errorsJason A. Donenfeld2021-01-081-4/+4
| | | | | | | | | | | | | | | | Some users report seeing lines like: > Routine: receive incoming IPv4 - stopped Popping up unexpectedly. Let's sleep and try again before failing, and also log the error, and perhaps we'll eventually understand this situation better in future versions. Because we have to distinguish between the socket being closed explicitly and whatever error this is, we bump the module to require Go 1.16. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: linux: do not allow ReceiveIPvX to race with CloseJason A. Donenfeld2021-01-071-17/+32
| | | | | | | If Close is called after ReceiveIPvX, then ReceiveIPvX will block on an invalid or potentially reused fd. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: do not SO_REUSEADDR on linuxJason A. Donenfeld2021-01-071-19/+0
| | | | | | SO_REUSEADDR does not make sense for unicast UDP sockets. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: add comments saying what uses these interfacesDavid Crawshaw2020-06-221-2/+5
| | | | Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
* conn: unbreak boundif on androidJason A. Donenfeld2020-06-072-0/+41
| | | | | | Another thing never tested ever. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: remove useless commentJason A. Donenfeld2020-06-071-1/+0
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: fix windows situation with boundifJason A. Donenfeld2020-06-071-4/+4
| | | | | | This was evidently never tested before committing. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: update header comments and modulesJason A. Donenfeld2020-05-026-6/+6
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: introduce new package that splits out the Bind and Endpoint typesDavid Crawshaw2020-05-026-0/+985
The sticky socket code stays in the device package for now, as it reaches deeply into the peer list. This is the first step in an effort to split some code out of the very busy device package. Signed-off-by: David Crawshaw <crawshaw@tailscale.com>