wgengine: define default tunname for each platform

The device name "tailscale0" will be used for all platforms except for
OpenBSD where "tun" is enforced by the kernel. `CreateTUN()` in
`wireguard-go` will select the next available "tunX" device name on the
OpenBSD system.

Signed-off-by: Martin Baillie <martin@baillie.email>
This commit is contained in:
Martin Baillie
2020-03-08 16:05:34 +11:00
committed by Dave Anderson
parent bb93d7aaba
commit 8ae3ba0cf5
7 changed files with 13 additions and 1 deletions

View File

@ -25,6 +25,8 @@ import (
// There is an experimental kernel version in the works for OpenBSD:
// https://git.zx2c4.com/wireguard-openbsd.
const DefaultTunName = "tun"
type openbsdRouter struct {
logf logger.Logf
tunname string