mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
wgengine/router: flushdns in windows when router config changes
Fixes: https://github.com/tailscale/tailscale/issues/1430 Signed-off-by: Aleksandar Pesic <peske.nis@gmail.com>
This commit is contained in:
parent
d491adbf09
commit
25d2dd868b
@ -111,6 +111,14 @@ func (r *winRouter) Set(cfg *Config) error {
|
||||
return fmt.Errorf("dns set: %w", err)
|
||||
}
|
||||
|
||||
// Flush DNS on router config change to clear cached DNS entries (solves #1430)
|
||||
out, err := exec.Command("ipconfig", "/flushdns").CombinedOutput()
|
||||
if err != nil {
|
||||
r.logf("flushdns error: %v; output: %s", err, out)
|
||||
} else {
|
||||
r.logf("flushdns successful")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user