GNOME Bugzilla – Bug 743368
renew addresses for active DHCP connections when carrier turns on
Last modified: 2015-06-26 12:43:44 UTC
Devices that are "ignore-carrier" still don't allow to activate a DHCP connection without having carrier -- which is correct. But when loosing carrier, the connection stays up -- which is probably correct too, even for DHCP. When carrier returns, NM does not try to renew the addresses -- wrong. Also TODO: check correct behavior if the lease expires while being unplugged. Correct behavior might be to tear down the connection.
(In reply to Thomas Haller from comment #0) > Devices that are "ignore-carrier" still don't allow to activate a DHCP > connection without having carrier -- which is correct. > > But when loosing carrier, the connection stays up -- which is probably > correct too, even for DHCP. Agreed. > > When carrier returns, NM does not try to renew the addresses -- wrong. > Fixed, published in branch jk/renew-dhcp-bgo743368. > > Also TODO: check correct behavior if the lease expires while being > unplugged. Correct behavior might be to tear down the connection. Tested. The connection is correctly deactivated when the lease expired.
(In reply to Jiri Klimes from comment #1) > > Also TODO: check correct behavior if the lease expires while being > > unplugged. Correct behavior might be to tear down the connection. > > Tested. The connection is correctly deactivated when the lease expired. yeah sounds right for now. But thinking about having the root-fs mounted from the network, in the future we might need a way to flag connections to keep them up at all cost (and ignore DHCP expires). >> device: renew DHCP lease for active "ignore-carrier" devices on carrier-on (bgo #743368) + if (priv->rdisc) { + /* FIXME: todo */ + } + if (priv->dnsmasq_manager) { + /* FIXME: todo */ + } these comments don't belong there after your change. Maybe leave update_for_ip_ifname_change() where it was, calling into update_dynamic_ip_setup()? Other then that, LGTM
I think the comments are still relevant. master: 348452f device: renew DHCP lease for active "ignore-carrier" devices on carrier-on (bgo #743368) nm-1-0: 94931d4 device: renew DHCP lease for active "ignore-carrier" devices on carrier-on (bgo #743368)