NetworkManager autoconnects to wired profiles in reverse order
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
network-manager (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Trusty |
New
|
High
|
Unassigned |
Bug Description
When I select a wired profile manually and reboot, NetworkManager instead connects to the profile that has the oldest timestamp. So it's not connecting to the last used profile, which is troublesome.
On all of our machines (about 500), we define three wired network profiles, one DHCP and two static. We're migrating from Debian to Ubuntu, so this bug has only surfaced now for us.
This can be reproduced by creating a couple of network profiles on the same wired interface and then rebooting or restarting network-manager. It will loop through the network profiles in the same order always. So it's doing the exact reverse of what's supposed to happen.
I did some digging and I applied a simple patch to the source code. This seems to have fixed the issue. I posted my patch for verification on the networkmanager mailing list and it was verified as being correct by Beniamino Galvani, one of the developers.
Here is the link to the network-manager topic: https:/
This is the patch (also included as attachment):
--- nm-device.c 2016-08-16 15:37:50.000000000 +0200
+++ nm-device_patched.c 2016-08-16 15:44:08.308729955 +0200
@@ -1267,7 +1267,7 @@
if (nm_setting_
- available_conns = g_slist_prepend (available_conns, connection);
+ available_conns = g_slist_append (available_conns, connection);
}
if (!available_conns)
I hope to get this patch included in the trusty package, so somebody else can benefit from this.
ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: network-manager 0.9.8.8-0ubuntu7.3
ProcVersionSign
Uname: Linux 4.4.0-34-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.21
Architecture: amd64
CRDA: Error: [Errno 2] Bestand of map bestaat niet: 'iw'
CurrentDesktop: Unity
Date: Tue Aug 16 15:23:17 2016
IfupdownConfig:
auto lo
iface lo inet loopback
IpRoute:
default via 10.30.6.1 dev em1 proto static
10.30.6.0/24 dev em1 proto kernel scope link src 10.30.6.204 metric 1
10.40.8.0/21 dev tun0 proto kernel scope link src 10.40.8.31
IwConfig:
tun0 no wireless extensions.
em1 no wireless extensions.
lo no wireless extensions.
NetworkManager.
[main]
NetworkingEnab
WirelessEnable
WWANEnabled=true
WimaxEnabled=true
ProcEnviron:
LANGUAGE=nl_BE:
PATH=(custom, no user)
XDG_RUNTIME_
LANG=nl_BE
SHELL=/bin/bash
RfKill:
SourcePackage: network-manager
UpgradeStatus: No upgrade log present (probably fresh install)
WifiSyslog:
nmcli-con:
NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT READONLY DBUS-PATH
DHCP 702624f9-
Proximus 7a9a5bc2-
nmcli-dev:
DEVICE TYPE STATE DBUS-PATH
em1 802-3-ethernet connected /org/freedeskto
nmcli-nm:
RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
running 0.9.8.8 connected enabled enabled enabled enabled disabled
The attachment "Patch to fix this" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.
[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]