Enabling Connectivity Checking in NetworkManager

Mathieu Trudel-Lapierre mathieu-tl at ubuntu.com
Tue Jul 10 18:41:35 UTC 2012


Hi,

At UDS some of us discussed the connectivity checking feature of
NetworkManager, which landed not long before the Precise release.

Connectivity checking would be a big benefit in helping with properly
recognizing the cases where you're connected to wireless, but actually
behind a captive portal which catches and redirects requests --
sometimes not all that gracefully. The most frequent impact of this is
a corrupted apt cache when the files don't fail to be downloaded, but
instead contain http data from the captive portal.

I'd like to enable connectivity checking in NetworkManager. We'd use
http://start.ubuntu.com/connectivity-check.html, running the check
every 5 minutes starting from the connection being established.
start.ubuntu.com has already been in use for a while to verify
connectivity from the installer, IIRC.

The net impact of this change will be a slight modification in the
actual status reported by NM -- NM_STATE_CONNECTED_SITE, rather than
NM_STATE_CONNECTED_GLOBAL. Most applications that depend on
NetworkManager to check connectivity already handle (the old state
NM_STATE_CONNECTED which now maps to GLOBAL), CONNECTED_LOCAL,
CONNECTED_SITE and CONNECTED_GLOBAL as meaning that they have internet
connectivity, so I don't expect consequences for the vast majority of
applications.

As for the actual change, it is limited to the
/etc/NetworkManager/NetworkManager.conf file; to which the following
will be added:

[connectivity]
uri=http://start.ubuntu.com/connectivity-check.html
response=Lorem ipsum

See the manual page for NetworkManager.conf(5) for the details of what
these settings do.

Please let me know if you have questions or think there are good
reasons not to enable this feature. If there is no response by the end
of the week, I'd like to proceed with a enabling this in Quantal and
making sure it gets well tested.

Kind regards,

Mathieu Trudel-Lapierre <mathieu-tl at ubuntu.com>
Freenode: cyphermox, Jabber: mathieu.tl at gmail.com
4096R/EE018C93 1967 8F7D 03A1 8F38 732E  FF82 C126 33E1 EE01 8C93



More information about the ubuntu-devel mailing list