aboutsummaryrefslogtreecommitdiff
path: root/conn/conn.go (follow)
Commit message (Collapse)AuthorAgeFilesLines
* global: use Go 1.18's netip helpersjd/netip-go118Jason A. Donenfeld2021-11-061-2/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: use netip where possible nowJason A. Donenfeld2021-11-061-33/+4
| | | | | | | | There are more places where we'll need to add it later, when Go 1.18 comes out with support for it in the "net" package. Also, allowedips still uses slices internally, which might be suboptimal. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: reconstruct v4 vs v6 receive function based on symtabJason A. Donenfeld2021-04-121-5/+51
| | | | | | This is kind of gross but it's better than the alternatives. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* all: make conn.Bind.Open return a slice of receive functionsJosh Bleecher Snyder2021-04-021-9/+8
| | | | | | | | | | | | | | | | | Instead of hard-coding exactly two sources from which to receive packets (an IPv4 source and an IPv6 source), allow the conn.Bind to specify a set of sources. Beneficial consequences: * If there's no IPv6 support on a system, conn.Bind.Open can choose not to return a receive function for it, which is simpler than tracking that state in the bind. This simplification removes existing data races from both conn.StdNetBind and bindtest.ChannelBind. * If there are more than two sources on a system, the conn.Bind no longer needs to add a separate muxing layer. Signed-off-by: Josh Bleecher Snyder <josharian@gmail.com>
* conn: make binds replacableJason A. Donenfeld2021-02-231-24/+19
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* global: bump copyrightJason A. Donenfeld2021-01-281-1/+1
| | | | 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>
* 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-071-0/+7
| | | | | | Another thing never tested ever. 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-021-1/+1
| | | | Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
* conn: introduce new package that splits out the Bind and Endpoint typesDavid Crawshaw2020-05-021-0/+101
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>