Description
In \dns/transport/local/local_resolved_linux.go, the \checkResolved\ method is called with \context.Background()\ from both:
- \Exchange()\ at line 141
- \updateStatus()\ at line 186
These calls pass \context.Background()\ into \CallWithContext()\ at line 234, meaning there is no application-level timeout or cancellation for the DBus \GetLink\ call.
Impact
If \systemd-resolved\ or the DBus daemon becomes unresponsive, the \CallWithContext\ call will block indefinitely. In the \Exchange()\ path, this blocks DNS resolution. In the \updateStatus()\ path (called from the signal processing goroutine \loopUpdateStatus), this stalls ALL DBus signal processing, preventing the resolver from reacting to network changes.
Location
\dns/transport/local/local_resolved_linux.go:141,186,234\
Suggested Fix
Use a context with a reasonable timeout (e.g., \context.WithTimeout(context.Background(), 10*time.Second)) instead of bare \context.Background(). The timeout should be long enough for normal DBus operations but short enough to prevent indefinite blocking.
Description
In \dns/transport/local/local_resolved_linux.go, the \checkResolved\ method is called with \context.Background()\ from both:
These calls pass \context.Background()\ into \CallWithContext()\ at line 234, meaning there is no application-level timeout or cancellation for the DBus \GetLink\ call.
Impact
If \systemd-resolved\ or the DBus daemon becomes unresponsive, the \CallWithContext\ call will block indefinitely. In the \Exchange()\ path, this blocks DNS resolution. In the \updateStatus()\ path (called from the signal processing goroutine \loopUpdateStatus), this stalls ALL DBus signal processing, preventing the resolver from reacting to network changes.
Location
\dns/transport/local/local_resolved_linux.go:141,186,234\
Suggested Fix
Use a context with a reasonable timeout (e.g., \context.WithTimeout(context.Background(), 10*time.Second)) instead of bare \context.Background(). The timeout should be long enough for normal DBus operations but short enough to prevent indefinite blocking.