mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-05 23:07:44 +00:00
ipn: outdent some code in if that's statically always true
This commit is contained in:
parent
5b95aa81ea
commit
b24029717b
28
ipn/local.go
28
ipn/local.go
@ -676,22 +676,20 @@ func (b *LocalBackend) authReconfig() {
|
||||
}
|
||||
b.logf("reconfig: ra=%v dns=%v 0x%02x\n", uc.RouteAll, uc.CorpDNS, uflags)
|
||||
|
||||
if nm != nil {
|
||||
dns := nm.DNS
|
||||
dom := nm.DNSDomains
|
||||
if !uc.CorpDNS {
|
||||
dns = []wgcfg.IP{}
|
||||
dom = []string{}
|
||||
}
|
||||
cfg, err := nm.WGCfg(uflags, dns)
|
||||
if err != nil {
|
||||
log.Fatalf("WGCfg: %v\n", err)
|
||||
}
|
||||
dns := nm.DNS
|
||||
dom := nm.DNSDomains
|
||||
if !uc.CorpDNS {
|
||||
dns = []wgcfg.IP{}
|
||||
dom = []string{}
|
||||
}
|
||||
cfg, err := nm.WGCfg(uflags, dns)
|
||||
if err != nil {
|
||||
log.Fatalf("WGCfg: %v\n", err)
|
||||
}
|
||||
|
||||
err = b.e.Reconfig(cfg, dom)
|
||||
if err != nil {
|
||||
b.logf("reconfig: %v", err)
|
||||
}
|
||||
err = b.e.Reconfig(cfg, dom)
|
||||
if err != nil {
|
||||
b.logf("reconfig: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user