tailscale/tstest
Aaron Klotz e016eaf410 cmd/tailscaled: conditionally flush Windows DNS cache on SessionChange
For the service, all we need to do is handle the `svc.SessionChange` command.
Upon receipt of a `windows.WTS_SESSION_UNLOCK` event, we fire off a goroutine to flush the DNS cache.
(Windows expects responses to service requests to be quick, so we don't want to do that synchronously.)

This is gated on an integral registry value named `FlushDNSOnSessionUnlock`,
whose value we obtain during service initialization.

(See [this link](https://docs.microsoft.com/en-us/windows/win32/api/winsvc/nc-winsvc-lphandler_function_ex) for information re: handling `SERVICE_CONTROL_SESSIONCHANGE`.)

Fixes #2956

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
2021-09-29 09:43:22 -06:00
..
integration cmd/tailscaled: conditionally flush Windows DNS cache on SessionChange 2021-09-29 09:43:22 -06:00
natlab fix: typo spelling grammar 2021-08-24 07:55:04 -07:00
staticcheck tstest/staticcheck: import the main package to fix "go mod tidy" 2021-02-20 09:53:47 -08:00
clock.go tstest/natlab: add a stateful firewall. 2020-07-11 05:17:38 +00:00
log_test.go tstest: rename LogListener to LogLineTracker 2020-09-04 08:09:56 -07:00
log.go tstest: make MemLogger.String acquire its mutex 2021-09-09 11:38:06 -07:00
resource.go net/dns{,/resolver}: refactor DNS forwarder, send out of right link on macOS/iOS 2021-06-23 16:04:10 -07:00
tstest.go tstest: add WaitFor helper 2021-04-29 14:43:46 -07:00