Skip to content

web-source: Fix connectivity check with transient DNS failures

Since MR !136 (merged) got merged Web-based sources (WiFi, 3G) no longer work on my laptop after a suspend-resume cycle.

The issue is caused by the DNS resolver not being operational for some time after resume (due to need to refresh DNSSEC keys, etc). This means that the first GClueWebSource connectivity check (network probe) sent after restoring the Internet connectivity usually fails.

No other probes are attempted after that since the network configuration itself does not change when the DNS resolver is finally fully operational. And so Web-based location sources never work again.

Besides this scenario there's also always a possibility of a transient DNS failure somewhere on the resolving path just as the probes are sent (this will also break Web-based sources).

The easiest way to fix this is to regard locate / submit URLs as always reachable if Internet is available, as the code before MR !136 (merged) did.

The connectivity probes can still be kept, however, so servers running on localhost can still be connected when there is no outside connectivity (that was the justification for change introduced by the aforementioned MR).

Or do you want to prepare a different fix for this @tpikonen?

Also included in this merge requests are small fixes around the neighboring code:

  • Only update "last_submitted" timestamp if we actually attempt to submit.

  • Cancel old g_network_monitor calls before starting new ones to avoid having multiple outstanding reachability checks if network configuration changes quickly multiple times.

Merge request reports