ethernet defaults for unconnected device are wrong

Bug #1707888 reported by Oliver Grawert
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
subiquity
New
Undecided
Unassigned

Bug Description

with the backport of the latest netplan to xenial you can now use the wlan and ethernet interfaces in subiquity on a pi3 (before the bind/unbind cycle broke wlan and you were forced to use ethernet in the first boot setup (and re-configure for wlan later)).

now, when doing the first-boot configuration for wlan only and not touching the ethernet defaults in console-conf at all (and not having any cable connected) i end up with:

ogra@pi3:~$ sudo cat /etc/netplan/00-snapd-config.yaml
# This is the network config written by 'console_conf'
network:
  ethernets:
    eth0:
      addresses: []
      dhcp4: true
  version: 2
  wifis:
    wlan0:
      access-points:
        XXXXXXXXXXX: {password: XXXXXXXXXX}
      addresses: []
      dhcp4: true

this setup (with no cable connected) causes a 2min timeout of the systemd-networkd-wait-online.service during boot... this service blindly waits for all configured interfaces by default ...

to avoid this you actually have to explicitly disable the dhcp settings of the ethernet device in console-conf, not touching eth0 and only setting up wlan0 will leave the ethernet device configured for dhcp, even though there was never any cable connected...

subiquity should check the link state before bringing up the network configuration UI and not default to configure eth0 for dhcp if there is no cable connected ... or alternatively simply not default to having dhcp enabled on interfaces the user never touched during system configuration.

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Makes sense I think, although, what is blocking on systemd-networkd-wait-online? I think it's behaviour of waiting on all interfaces is pretty unhelpful, but even given that, an Ubuntu core system shouldn't block for 2 minutes on boot if it is not connected to the internet...

Revision history for this message
Oliver Grawert (ogra) wrote :

seems that systemd 229 had a bunch of such issues that were fixed in a later version (bug 1673092 is an example ...) seems some of the network bits got some overhaul in 232.

also, while systemd-networkd-wait-online supports --ignore and has an --interface option, systemd-networkd-wait-online.service simply calls it without any options in 229 which makes it wait for any interface that has a config.

affects: subiquity (Ubuntu) → subiquity
Revision history for this message
Oliver Grawert (ogra) wrote :

@steve ... i'm not sure this is actually a duplicate, if i did never touch the eth0 interface and only configured wlan0 on a device that has two such cards, subiquity will still put a default config in place for the untouched device ...

while the resulting behaviour might match the duplicate and while this should definitely be fixed, i think the subiquity defaults here have some additional implications, like secuity ...

i.e: i have never touched eth0 and rely on the fact that someone stealing my IoT device must have access to the right wlan credentials to obtain a network connection for an attack ... with eth0 defaulting to always use dhcp even if i never touched or configured it you can now simply plug the device into any dhcp capable lan and just start attacking it via the obtained IP.

this subiquity behaviour is unexpected, network devices that have never been touched in the config UI should stay off until i configure them in any way.

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.