connectivity check no longer working reliably with 1.40
- Ubuntu 22.10
- NetworkManager 1.40.0 (also verified with NetworkManager 1.40.4)
Test Case 1
Ubuntu preinstalls a deb package named network-manager-config-connectivity-ubuntu which installs a file /usr/lib/NetworkManager/conf.d
with this content:
[connectivity]
uri=http://connectivity-check.ubuntu.com./
After installing that file, reload NetworkManager. I suggest sudo systemctl restart NetworkManager
Then run this command several times in a terminal:
nmcli networking connectivity check
I occasionally get a return status of full
, but I often incorrectly get portal
Test Case 2
When I update the uri to http://network-test.debian.org/nm
(You can install network-manger-config-connectivity-debian and uninstall the ubuntu package), I consistently correctly get full
(Remember to run something like sudo systemctl restart NetworkManager
after changing the file.)
Other Info
The Ubuntu check URI doesn't return any content, just a 204
HTTP status code and the special header x-networkmanager-status: online
The Debian check URI returns a minimal page with the special text "NetworkManager is online" and status code 200.
Both Ubuntu and Debian's responses seem valid according to https://manpages.debian.org/NetworkManager.conf.5#CONNECTIVITY_SECTION
I didn't fully test Fedora's setup but it appears to work like Debian's but with overriding the special text to "OK" in its config file.
The Ubuntu check works correctly (consistently returns full
) with Ubuntu 22.04 LTS and NetworkManager 1.36.6.
Original Ubuntu bug: https://launchpad.net/bugs/1998082