ipn: outdent some code in if that's statically always true

This commit is contained in:
Brad Fitzpatrick 2020-04-10 07:52:30 -07:00
parent 5b95aa81ea
commit b24029717b

View File

@ -676,22 +676,20 @@ func (b *LocalBackend) authReconfig() {
} }
b.logf("reconfig: ra=%v dns=%v 0x%02x\n", uc.RouteAll, uc.CorpDNS, uflags) b.logf("reconfig: ra=%v dns=%v 0x%02x\n", uc.RouteAll, uc.CorpDNS, uflags)
if nm != nil { dns := nm.DNS
dns := nm.DNS dom := nm.DNSDomains
dom := nm.DNSDomains if !uc.CorpDNS {
if !uc.CorpDNS { dns = []wgcfg.IP{}
dns = []wgcfg.IP{} dom = []string{}
dom = []string{} }
} cfg, err := nm.WGCfg(uflags, dns)
cfg, err := nm.WGCfg(uflags, dns) if err != nil {
if err != nil { log.Fatalf("WGCfg: %v\n", err)
log.Fatalf("WGCfg: %v\n", err) }
}
err = b.e.Reconfig(cfg, dom) err = b.e.Reconfig(cfg, dom)
if err != nil { if err != nil {
b.logf("reconfig: %v", err) b.logf("reconfig: %v", err)
}
} }
} }