wgengine: don't lose filter state on filter reconfig.

We were abandoning the UDP port LRU every time we got a new packet
filter from tailcontrol, which caused return packets to suddenly stop
arriving.
This commit is contained in:
Avery Pennarun
2020-03-25 03:47:55 -04:00
parent 4336de0d98
commit f53e78e0d5
6 changed files with 46 additions and 15 deletions

View File

@@ -101,6 +101,9 @@ type Engine interface {
// sends an updated network map.
Reconfig(cfg *wgcfg.Config, dnsDomains []string) error
// GetFilter returns the current packet filter, if any
GetFilter() *filter.Filter
// SetFilter updates the packet filter.
SetFilter(*filter.Filter)