net/dns: handle D-Bus restarts in resolved manager (#5026)

When dbus restarts it can cause the tailscaled to crash because the nil
signal was not handled in resolved.Fixing so the nil signal leads to a
connection reset and tailscaled stays connected to systemd when dbus restarted.

Fixes #4645

Co-authored-by: James Tucker <james@tailscale.com>
Signed-off-by: nyghtowl <warrick@tailscale.com>

Co-authored-by: James Tucker <james@tailscale.com>
This commit is contained in:
Melanie Warrick
2022-07-22 12:49:18 -07:00
committed by GitHub
parent 898695e312
commit f17873e0f4
2 changed files with 155 additions and 73 deletions

View File

@@ -17,6 +17,7 @@ type OSConfigurator interface {
// If cfg is the zero value, all Tailscale-related DNS
// configuration is removed.
// SetDNS must not be called after Close.
// SetDNS takes ownership of cfg.
SetDNS(cfg OSConfig) error
// SupportsSplitDNS reports whether the configurator is capable of
// installing a resolver only for specific DNS suffixes. If false,