wgengine: generate and plumb router.Settings in from ipn.

This saves a layer of translation, and saves us having to
pass in extra bits and pieces of the netmap and prefs to
wgengine. Now it gets one Wireguard config, and one OS
network stack config.

Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:
David Anderson
2020-05-11 21:02:12 +00:00
committed by Dave Anderson
parent e42ec4efba
commit 72cae5504c
4 changed files with 68 additions and 69 deletions

View File

@ -12,6 +12,7 @@ import (
"tailscale.com/ipn/ipnstate"
"tailscale.com/tailcfg"
"tailscale.com/wgengine/filter"
"tailscale.com/wgengine/router"
)
// ByteCount is the number of bytes that have been sent or received.
@ -59,7 +60,7 @@ type Engine interface {
// sends an updated network map.
//
// The returned error is ErrNoChanges if no changes were made.
Reconfig(cfg *wgcfg.Config, dnsDomains []string, localSubnets []wgcfg.CIDR, noSNAT bool) error
Reconfig(cfg *wgcfg.Config, routerCfg router.Settings) error
// GetFilter returns the current packet filter, if any.
GetFilter() *filter.Filter