Add NetworkManager connectivity config package

Bug #997200 reported by Jane Silber
96
This bug affects 18 people
Affects Status Importance Assigned to Milestone
NetworkManager
Confirmed
Wishlist
network-manager (Debian)
Fix Released
Unknown
network-manager (Ubuntu)
Fix Released
High
Unassigned
Precise
Won't Fix
High
Unassigned
Artful
Fix Released
High
Unassigned
ubuntu-meta (Ubuntu)
Fix Released
High
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Artful
Fix Released
High
Unassigned
update-manager (Ubuntu)
Invalid
High
Unassigned
Precise
Won't Fix
High
Unassigned
Artful
Won't Fix
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

Revision history for this message
Jane Silber (silbs) wrote :
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) 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
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

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).

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

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)
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
Revision history for this message
Stéphane Graber (stgraber) wrote : Re: update-manager can't handle hotel web access pages

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.

Revision history for this message
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)
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
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

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
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

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.

Revision history for this message
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
Revision history for this message
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)
Revision history for this message
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)
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)
tags: added: nm-improvements
removed: nm-features
Revision history for this message
Aron Xu (happyaron) wrote : Re: Test for captive portal before putting applications in online mode

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.

Revision history for this message
Jeremy Bícha (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.

Revision history for this message
Jeremy Bícha (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.

Revision history for this message
Jeremy Bícha (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 Bícha (jbicha)
description: updated
Changed in network-manager (Ubuntu):
status: Triaged → New
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: [FFe] Add NetworkManager connectivity config package

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

Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
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 Bícha (jbicha)
summary: - [FFe] Add NetworkManager connectivity config package
+ Add NetworkManager connectivity config package
Revision history for this message
Jeremy Bícha (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
Revision history for this message
Jeremy Bícha (jbicha) wrote :

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

Will Cooke (willcooke)
Changed in network-manager (Ubuntu Artful):
status: Confirmed → In Progress
Jeremy Bícha (jbicha)
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 Bícha (jbicha)
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 Bícha (jbicha)
description: updated
Jeremy Bícha (jbicha)
description: updated
Revision history for this message
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
Revision history for this message
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
Revision history for this message
Jeremy Bícha (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  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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