mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-29 04:55:31 +00:00
Reduce some logspam.
This commit is contained in:
parent
61529ac459
commit
657f9593ae
@ -226,7 +226,10 @@ func (b *LocalBackend) Start(opts Options) error {
|
|||||||
if b.netMapCache != nil && b.cmpDiff != nil {
|
if b.netMapCache != nil && b.cmpDiff != nil {
|
||||||
s1 := strings.Split(b.netMapCache.Concise(), "\n")
|
s1 := strings.Split(b.netMapCache.Concise(), "\n")
|
||||||
s2 := strings.Split(newSt.NetMap.Concise(), "\n")
|
s2 := strings.Split(newSt.NetMap.Concise(), "\n")
|
||||||
b.logf("netmap diff:\n%v\n", b.cmpDiff(s1, s2))
|
diff := b.cmpDiff(s1, s2)
|
||||||
|
if strings.TrimSpace(diff) != "" {
|
||||||
|
b.logf("netmap diff:\n%v\n", diff)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
b.netMapCache = newSt.NetMap
|
b.netMapCache = newSt.NetMap
|
||||||
b.mu.Unlock()
|
b.mu.Unlock()
|
||||||
|
@ -353,8 +353,6 @@ func (e *userspaceEngine) Reconfig(cfg *wgcfg.Config, dnsDomains []string) error
|
|||||||
DNS: cfg.DNS,
|
DNS: cfg.DNS,
|
||||||
DNSDomains: dnsDomains,
|
DNSDomains: dnsDomains,
|
||||||
}
|
}
|
||||||
e.logf("Reconfiguring router. la=%v dns=%v dom=%v\n",
|
|
||||||
rs.LocalAddr, rs.DNS, rs.DNSDomains)
|
|
||||||
|
|
||||||
// TODO(apenwarr): all the parts of RouteSettings should be "relevant."
|
// TODO(apenwarr): all the parts of RouteSettings should be "relevant."
|
||||||
// We're checking only the "relevant" parts to see if they have
|
// We're checking only the "relevant" parts to see if they have
|
||||||
@ -364,16 +362,19 @@ func (e *userspaceEngine) Reconfig(cfg *wgcfg.Config, dnsDomains []string) error
|
|||||||
// a whole Cfg object as part of RouteSettings; instead, trim it to
|
// a whole Cfg object as part of RouteSettings; instead, trim it to
|
||||||
// just what's absolutely needed (the set of actual routes).
|
// just what's absolutely needed (the set of actual routes).
|
||||||
rss := rs.OnlyRelevantParts()
|
rss := rs.OnlyRelevantParts()
|
||||||
e.logf("New routes: %v\n", rss)
|
if rss != e.lastRoutes {
|
||||||
if rss == e.lastRoutes {
|
e.logf("Reconfiguring router. la=%v dns=%v dom=%v; new routes: %v\n",
|
||||||
e.logf("...unchanged routes, skipping.\n")
|
rs.LocalAddr, rs.DNS, rs.DNSDomains, rss)
|
||||||
return nil
|
|
||||||
}
|
|
||||||
e.lastRoutes = rss
|
e.lastRoutes = rss
|
||||||
err = e.router.SetRoutes(rs)
|
err = e.router.SetRoutes(rs)
|
||||||
e.logf("Reconfig() done.\n")
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
e.logf("Reconfig() done.\n")
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func (e *userspaceEngine) SetFilter(filt *filter.Filter) {
|
func (e *userspaceEngine) SetFilter(filt *filter.Filter) {
|
||||||
var filtin, filtout func(b []byte) device.FilterResult
|
var filtin, filtout func(b []byte) device.FilterResult
|
||||||
|
Loading…
Reference in New Issue
Block a user