wireless_before_suspend should remember which connection was active

Bug #861502 reported by Ara Pulido
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
High
Brendan Donegan

Bug Description

wireless_before_suspend does not remember which network was connected to.

So, when firing "reconnect" it will reconnect to whatever available network connection on that interface is available:

When starting the test, I am connected to BETAHAUS On Speed and this is what happens:

$ nmcli -t -f DEVICES con status > $CHECKBOX_DATA/iface && ./connect_wireless && ./internet_test --interface=`nmcli dev list | grep -B 1 wireless | grep GENERAL.DEVICE | awk '{print $2}'` && ./reconnect `cat $CHECKBOX_DATA/iface`
Error: Device 'eth0' (/org/freedesktop/NetworkManager/Devices/0) disconnecting failed: This device is not active
Device state: 30 (disconnected)
Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/23
state: activated
Connection activated ------ # It is connected to BETAHAUS on Speed
Internet connection fully established
Active connection state: activating
Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/24
state: activated
Connection activated ------ # It is connected to BETAHAUS

Related branches

Ara Pulido (ara)
Changed in checkbox:
assignee: nobody → Ara Pulido (apulido)
status: New → In Progress
importance: Undecided → Medium
Ara Pulido (ara)
summary: - suspend/wireless_before_suspend connects to two wireless networks,
- although just one is active
+ wireless_before_suspend should remember which connection was active
Changed in checkbox:
assignee: Ara Pulido (apulido) → nobody
milestone: none → 0.12.8
status: In Progress → Triaged
Revision history for this message
Ara Pulido (ara) wrote :

Setting it to High, as it may try to reconnect to a remembered connection that it is not available

description: updated
Changed in checkbox:
milestone: 0.12.8 → 0.13
milestone: 0.13 → 0.12.8
importance: Medium → High
Revision history for this message
Ara Pulido (ara) wrote :

A simpler fix would be to get nmcli to return only the available networks, not only the remembered ones

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

Wouldn't it just :) Unfortunately as I found out while developing the script, it's not that easy. I think it's still possible though, but I need a bit of time so will look at this one tomorrow.

Revision history for this message
Jeff Lane  (bladernr) wrote :

I've been looking into this and was wondering a couple things...

why two scripts instead of one that does both connection and reconnection checking? Just curious...

why the bits in connect_wireless to strip trailing/leading whitespace? was that an issue in nmcli output, or just in case someone got crazy with their AP naming?

Seems that maybe the simplest thing to do would be similar to what is done with the iface file... just create a file initially containing the AP that was connected to begin with and then use nmcli to connect to that AP on reconnect.

Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

It turns out there is an easy way to just spit the connection names into a file and then bring them back up at the 'reconnect' phase (my patch removes reconnect since the functionality to replace it is relatively terse)

To answer Jeff's question, yes the stuff to strip the whitespace was to do with some funky AP naming. As Ara's endeavours has shown, the world of wireless connections is dark and murky and you can never be too safe!

Changed in checkbox:
assignee: nobody → Brendan Donegan (brendan-donegan)
status: Triaged → In Progress
Ara Pulido (ara)
Changed in checkbox:
status: In Progress → Fix Committed
Ara Pulido (ara)
Changed in checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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