Add NetworkManager connectivity config package

Bug #997200 reported by Jane Silber on 2012-05-09
96
This bug affects 18 people
Affects Status Importance Assigned to Milestone
NetworkManager
Confirmed
Wishlist
network-manager (Debian)
Fix Released
Unknown
network-manager (Ubuntu)
High
Unassigned
Precise
High
Unassigned
Artful
High
Unassigned
ubuntu-meta (Ubuntu)
High
Unassigned
Precise
Undecided
Unassigned
Artful
High
Unassigned
update-manager (Ubuntu)
High
Unassigned
Precise
High
Unassigned
Artful
High
Unassigned

Bug Description

How to Disable This Feature
===========================
Option 1
--------
If you are using the default Ubuntu or GNOME, open the Settings app, browse to Privacy and turn off Network Connectivity Checking.

Option 2
--------
You could also disable it by adding a file to /etc/NetworkManager/conf.d/
with this content:
[connectivity]
enabled=false

Then restart NetworkManager or your computer, whichever is easier.

Feature
=======
A separate network-manager-config-connectivity-ubuntu package that contains the 2-line config snippet to enable NetworkManager's connectivity check. This is the same approach taken by Fedora since 2014 (their package is named network-manager-config-connectivity-fedora).

With this config, GNOME Shell will pop up a browser page when a captive portal is detected. The browser page is powered by webkit2gtk.
https://help.gnome.org/misc/release-notes/3.14/#captive-portals

This new feature (and how to opt out) will be mentioned in Ubuntu 17.10's Release Notes.

Enabling the connectivity check by default for all of Ubuntu was discussed almost 5 years ago:
https://lists.ubuntu.com/archives/ubuntu-devel/2012-July/035490.html

Link to newer discussion:
https://lists.ubuntu.com/archives/ubuntu-devel/2017-February/039696.html

Original Bug Report
==================
When in a hotel there is a often a T&Cs page that is delivered when connecting to the network. Some combination of network manager and update manager (or something else entirely) doesn't seem to be able to handle this, and update are left in a non-working state after not being able to read package headers file.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: network-manager 0.9.4.0-0ubuntu3
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Wed May 9 17:27:02 2012
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
IpRoute:
 default via 10.155.32.1 dev wlan0 proto static
 10.155.32.0/19 dev wlan0 proto kernel scope link src 10.155.38.82 metric 2
 169.254.0.0/16 dev wlan0 scope link metric 1000
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: network-manager
UpgradeStatus: Upgraded to precise on 2012-03-07 (63 days ago)
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 wlan0 802-11-wireless connected /org/freedesktop/NetworkManager/Devices/1
 eth0 802-3-ethernet unavailable /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 running 0.9.4.0 connected enabled enabled enabled enabled disabled

Related branches

Jane Silber (silbs) wrote :

Confirming; we even have a nice fix for this at the NetworkManager level via connectivity checking, but it was new and disruptive enough to not make it in 12.04 -- we're going to be enabling this in the development release very very soon.

Also confirming for update-manager: I've run into the same issue before as well. update-manager/apt ought to distinguish between the type of data being recovered by the downloads, and have a way to gracefully handle these evil captive portals.

Changed in network-manager (Ubuntu):
status: New → Triaged
Changed in update-manager (Ubuntu):
status: New → Confirmed
Changed in network-manager (Ubuntu):
importance: Undecided → High
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
milestone: none → quantal-alpha-1

Milestoned for quantal-alpha-1 because I know it has to be done, and we need it early enough to be able to any issues it might cause. It should land much earlier though, probably as early as next upload of network-manager (next week or so).

As a workaround, since the connectivity check feature is already available, just not activated by default, you may wish to activate it with what will likely be the additional configuration we will ship. To do this, you can add the following lines to /etc/NetworkManager/NetworkManager.conf

[connectivity]
uri=http://start.ubuntu.com/connectivity-check.html
interval=300
response=<!DOCTYPE HTML PUBLIC

This changes the behavior of NM to use a different "connected" state when the checks fail, so the exact behavior of applications may change (and will need to be tested). At least, this currently appears to work properly on my computer; pending further testing once my portal session expires.

Changed in update-manager (Ubuntu):
importance: Undecided → High
Thomas Hood (jdthood) on 2012-05-30
summary: - update checks can't understand hotel web access pages
+ update-manager can't handle hotel web access pages
Changed in network-manager (Ubuntu):
milestone: quantal-alpha-1 → quantal-alpha-2
Changed in network-manager (Ubuntu Quantal):
milestone: quantal-alpha-2 → quantal-alpha-3
Changed in update-manager (Ubuntu Quantal):
milestone: none → quantal-alpha-3
Changed in update-manager (Ubuntu Precise):
status: New → Confirmed
importance: Undecided → High
milestone: none → ubuntu-12.04.1
Changed in network-manager (Ubuntu Precise):
importance: Undecided → High
status: New → Triaged
milestone: none → ubuntu-12.04.1

Mathieu: What's the status of this? will we have a fix landing in quantal and precise over the coming days/weeks?

This bug is targeted to the point release and time is running out to get all the fixes in on time.

Stéphane Graber (stgraber) wrote :

Per discussion with Mathieu, the fix for this is controversial for quantal so it's pretty unlikely to land in quantal and be backported on time.
On top of that, the current fix actually turns on an extra feature in Network Manager so it'd have to be very carefully tested and discussed with the release/SRU team for approval.

The plan is basically:
 - Turn on the connectivity check in Network Manager (once we agree on the frequency of the check and exactly how to check. cf <email address hidden>)
 - Change update-manager to talk to Network Manager and check the state properly (assuming it currently doesn't check for CONNECTED_GLOBAL)
 - Test in quantal
 - Backport both changes to precise

Changed in network-manager (Ubuntu Precise):
milestone: ubuntu-12.04.1 → precise-updates
Changed in update-manager (Ubuntu Precise):
milestone: ubuntu-12.04.1 → precise-updates
Colin Watson (cjwatson) on 2012-09-10
Changed in network-manager (Ubuntu Quantal):
milestone: quantal-alpha-3 → ubuntu-12.10-beta-2
Changed in update-manager (Ubuntu Quantal):
milestone: quantal-alpha-3 → ubuntu-12.10-beta-2
Changed in network-manager (Ubuntu Quantal):
milestone: ubuntu-12.10-beta-2 → quantal-updates
Changed in update-manager (Ubuntu Quantal):
milestone: ubuntu-12.10-beta-2 → quantal-updates
Changed in network-manager (Ubuntu Quantal):
assignee: Mathieu Trudel-Lapierre (mathieu-tl) → nobody

After further discussion (with Stéphane Graber and Didier Roche) we'll tackle this *very early* in the R release. It's too late in the quantal release cycle to enable such a polarizing "new feature" (https://lists.ubuntu.com/archives/ubuntu-devel/2012-July/035490.html), especially one that needs further discussion and work on the design and technical side to really be efficient when enabled for a majority of our users.

There has been a lot of really useful feedback on the thread, with quite a few things that will have to be investigated; such as how to indicate and/or prompt users to open a browser and handle authentication on captive portals, checking intervals, checking methods and on-demand checking.

We'll schedule a UDS discussion specifically on that subject and enable the feature as-is as soon as R is opened so that work can start and bugs can be opened for any things we may have overlooked.

Changed in network-manager (Ubuntu Precise):
status: Triaged → Won't Fix
Changed in network-manager (Ubuntu Quantal):
status: Triaged → Won't Fix
Changed in network-manager (Ubuntu Precise):
milestone: precise-updates → none
Changed in network-manager (Ubuntu Quantal):
milestone: quantal-updates → none

update-manager remains possibly fixable if the validity of the data retrieved can be checked; so while this is marked "won't fix" for NetworkManager (due to the above), I'm leaving the update-manager tasks confirmed.

Brian Murray (brian-murray) wrote :

The underlying issue of bad files being created by apt, not update-manager, in /var/lib/apt/lists/ has been resolved in Quantal and is being resolved in 12.04 LTS. This is being tracked in bug 346386.

However, the original description that "update-manager can't handle hotel web access pages" is still true. update-manager with the fix for apt in place will tell you that it was unable to download a package and to check your internet connection. If connectivity checking is available update-manager should use that to present the user with a more informative error message.

Changed in update-manager (Ubuntu Precise):
status: Confirmed → Won't Fix
Changed in update-manager (Ubuntu Quantal):
status: Confirmed → Won't Fix
Marius B. Kotsbak (mariusko) wrote :

Added upstream bug report. See also the handling of standard protocol: https://bugzilla.gnome.org/show_bug.cgi?id=670394. There were some patches on the mailinglist about that: https://mail.gnome.org/archives/networkmanager-list/2013-February/msg00031.html.

Changed in network-manager:
importance: Unknown → Wishlist
status: Unknown → Confirmed
Changed in update-manager (Ubuntu Raring):
status: Triaged → Won't Fix
Changed in network-manager (Ubuntu Raring):
status: Triaged → Won't Fix
Changed in network-manager (Ubuntu):
milestone: quantal-updates → none
Changed in update-manager (Ubuntu):
assignee: nobody → johnny d lynch (lynchjohnny48)
Rolf Leggewie (r0lf) wrote :

What is the status of this bug for the different packages?

Changed in update-manager (Ubuntu):
assignee: johnny d lynch (lynchjohnny48) → nobody
Aron Xu (happyaron) on 2016-12-20
summary: - update-manager can't handle hotel web access pages
+ Test for captive portal before putting applications in online mode
Changed in network-manager (Ubuntu Raring):
assignee: Mathieu Trudel-Lapierre (cyphermox) → nobody
tags: added: nm-features
removed: amd64 apport-bug precise
Aron Xu (happyaron) on 2016-12-20
tags: added: nm-improvements
removed: nm-features

Just did some testing with up-to-date 16.04 LTS:

1. Initial state:
Wi-Fi enabled, but not connected to any network; ethernet is unplugged.

$ nmcli general
STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN
disconnected none enabled enabled enabled enabled

2. Connect to a SSID that has captive portal:
$ nmcli general
STATE CONNECTIVITY WIFI-HW WIFI WWAN-HW WWAN
connected full enabled enabled enabled enabled

This means network-manager has put the state to connected and emits a signal of full connectivity, which makes other applications "think" the device is online with full access to the Internet.

Jeremy Bicha (jbicha) wrote :

Aron, let me know if I should open a new bug report instead. I haven't tested this yet but I could. I just had someone ask me why Ubuntu GNOME doesn't support this if GNOME has for 2 years.

https://www.lguruprasad.in/blog/2015/07/21/enabling-captive-portal-detection-in-gnome-3-14-on-debian-jessie/

https://labs.riseup.net/code/issues/10526

See also bug 914507 bug 1072675

Since all that is apparently needed is an /etc file, I guess this could be enabled selectively by gnome-shell if it doesn't work on Unity but I'm curious if there was a reason this isn't enabled in Debian or Ubuntu.

Jeremy Bicha (jbicha) wrote :

I talked to mbiebl about this today in #debian-gnome. He does not intend to enable it by default on Debian because their users are more sensitive to services that "phone home". I don't think that's as big of a concern for Ubuntu since we enable unattended-upgrades and whoopsie (and probably more) by default.

He said he would probably include a config file for it in /usr/share/doc/network-manager/examples/ with a note in README.Debian.

Jeremy Bicha (jbicha) wrote :

I hope it was ok for me to take over this bug.

I think apt is smarter these days and doesn't corrupt its cache when it gets invalid data.

I think we should split off changes to ubiquity, update-manager, etc. to separate bugs.

description: updated
summary: - Test for captive portal before putting applications in online mode
+ [FFe] Add NetworkManager connectivity config package
Jeremy Bicha (jbicha) on 2017-02-22
description: updated
Changed in network-manager (Ubuntu):
status: Triaged → New

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Bryan Quigley (bryanquigley) wrote :

I agree, about splitting off other bugs that take advantage of this feature. There is already a whoopsie bug for instance - https://bugs.launchpad.net/ubuntu/+source/whoopsie/+bug/991481.

Not everything needs to use this (immediately) for it to be useful. (huge +1 to this change btw)

Jeremy Bicha (jbicha) on 2017-04-09
summary: - [FFe] Add NetworkManager connectivity config package
+ Add NetworkManager connectivity config package
Jeremy Bicha (jbicha) wrote :

I believe we want to work with GNOME to add a toggle switch in Settings>Privacy for this feature.

https://bugzilla.gnome.org/737362

Changed in network-manager (Debian):
status: Unknown → New
Changed in network-manager (Debian):
status: New → Fix Released
Jeremy Bicha (jbicha) wrote :

I split the gnome-control-center part of this feature to LP: #1704162

Will Cooke (willcooke) on 2017-08-25
Changed in network-manager (Ubuntu Artful):
status: Confirmed → In Progress
Jeremy Bicha (jbicha) on 2017-08-27
no longer affects: network-manager (Ubuntu Quantal)
no longer affects: network-manager (Ubuntu Raring)
no longer affects: update-manager (Ubuntu Quantal)
no longer affects: update-manager (Ubuntu Raring)
Changed in ubuntu-meta (Ubuntu Precise):
status: New → Won't Fix
Jeremy Bicha (jbicha) on 2017-08-27
description: updated
Changed in network-manager (Ubuntu Artful):
status: In Progress → Fix Committed
Changed in ubuntu-meta (Ubuntu Artful):
importance: Undecided → High
status: New → In Progress
Jeremy Bicha (jbicha) on 2017-08-28
description: updated
Jeremy Bicha (jbicha) on 2017-08-28
description: updated
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package network-manager - 1.8.2-1ubuntu5

---------------
network-manager (1.8.2-1ubuntu5) artful; urgency=medium

  * Add connectivity-allow-override.patch:
    - Cherry-pick patch to fix using D-Bus to override connectivity check
      disabling in /etc/ . See GNOME bug 786890 for more details.

 -- Jeremy Bicha <email address hidden> Mon, 28 Aug 2017 09:23:01 -0400

Changed in network-manager (Ubuntu Artful):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-meta - 1.398

---------------
ubuntu-meta (1.398) artful; urgency=medium

  * Refreshed dependencies
  * Added mount to minimal
  * Added network-manager to desktop-recommends
  * Added network-manager-config-connectivity-ubuntu to desktop-
    recommends (LP: #997200)
  * Removed network-manager-gnome from desktop-recommends
  * Removed onboard from desktop-recommends

 -- Jeremy Bicha <email address hidden> Wed, 30 Aug 2017 08:28:53 -0400

Changed in ubuntu-meta (Ubuntu Artful):
status: In Progress → Fix Released
Jeremy Bicha (jbicha) wrote :

I'm closing the artful task for update-manager. If update-manager needs more work to support the connectivity status, I think that should be split off to a new bug.

Changed in update-manager (Ubuntu Artful):
milestone: quantal-updates → none
status: Confirmed → Won't Fix
Changed in update-manager (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.