Commit Graph

1126 Commits (88133c361e8cc267b9e45c90f357f96084c60a0c)

Author SHA1 Message Date
Brad Fitzpatrick e06ca40650 wgengine, magicsock, derp: misc cleanups, docs
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
wardn 5d79530caa wgengine: create freebsd-specific implementation
Signed-off-by: wardn <wardn@users.noreply.github.com>
4 years ago
Brad Fitzpatrick 259406e797 derp: move away from [32]byte key types
And some minor cleanup in the process.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
Tobias Klauser 4d09316f9a wgengine/monitor: use RTMGRP_* consts from x/sys/unix
Bump golang.org/x/sys/unix to get the RTMGRP_* consts and use them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
4 years ago
Brad Fitzpatrick 997678f540 wgengine/monitor: make Close not block forever on Linux
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
Brad Fitzpatrick 7f5e3febe5 wgengine: move link monitor to be owned by the engine, not the router
And make the monitor package portable with no-op implementations on
unsupported operating systems.

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
Brad Fitzpatrick 79295b1138 wgengine: simplify, change some signatures
* make RouterGen return an error, not take both tunname and tundev
* also remove RouteGen taking a wireguard/device.Device; currently unused
* remove derp parameter (it'll work differently)
* unexport NewUserspaceRouter in per-OS impls, add documented wrapper

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
Brad Fitzpatrick 2896be60db Move "logger" package to under types, now that we have it.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
Brad Fitzpatrick 587c3fcac4 control/controlclient, wgengine/magicsock: misc cleanups
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
wardn 58ce50389e wgengine: build for freebsd
Signed-off-by: wardn <wardn@users.noreply.github.com>
4 years ago
wardn 2cafbd74c7 monitor: refactor for architecture-specific connection implementations
Signed-off-by: wardn <wardn@users.noreply.github.com>
4 years ago
Brad Fitzpatrick c773abde77 wgengine: fix nil pointer deref crash from earlier change
Fixes #45
4 years ago
Brad Fitzpatrick 745c8c92b1 wgengine: fix windows build for winipcfg-go
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
David Anderson 36f5433476 wgengine: fix the build on darwin, windows, openbsd.
7e5e3277 changed the Router interface definition, but forgot to
fix up these platform files.

Signed-off-by: David Anderson <dave@natulte.net>
4 years ago
David Anderson 5c2deb66be wgengine: remove MTU TODO.
The MTU is currently set when creating the tun device,
elsewhere in the code. Maybe someday we'll want some kind
of per-platform MTU configuration here, but not in the
short-medium term.

Signed-off-by: David Anderson <dave@natulte.net>
4 years ago
David Anderson afa83358f7 wgenging: use logger.Logf type in openbsd router.
Signed-off-by: David Anderson <dave@natulte.net>
4 years ago
Martin Baillie 15f8c8dde4 wgengine: add initial rough OpenBSD implementation
Signed-off-by: Martin Baillie <martin@baillie.email>
4 years ago
Brad Fitzpatrick 7e5e32775a wgengine: flesh out some docs, minor cleanups
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
Brad Fitzpatrick 819daf10e2 wgengine: flesh out some docs
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
wardn 490e586eac wgengine: add required NewFakeRouter parameter
Signed-off-by: wardn <wardn@users.noreply.github.com>
4 years ago
Brad Fitzpatrick a59dc5f155 Use logger.Logf consistently. It was used in most places.
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
4 years ago
David Anderson 2f9cdd0aac wgengine: fix error string.
Signed-off-by: David Anderson <dave@natulte.net>
4 years ago
David Anderson 43becc4334 wgengine/packet: fix minor lint errors.
Signed-off-by: David Anderson <dave@natulte.net>
4 years ago
David Anderson a07906d1d8 wgengine: make SetRoutesFunc less appealing to use.
It exists as a way to glue the mac-specific xcode logic with the OSS
logic, and shouldn't be used by anything but the xcode glue.
4 years ago
David Crawshaw 87334fb332 wgengine, controlclient: fewer pointers in wgcfg key types
Signed-off-by: David Crawshaw <david@zentus.com>
4 years ago
Earl Lee a8d8b8719a Move Linux client & common packages into a public repo. 4 years ago