Skip to content

Fails to get new address if lease expires while the PC is suspended #596

@alanthird

Description

@alanthird

Hi,

This one is a bit hard to test as I don't seem to be able to get a lease of less than 24 hours, but as far as I can tell if the lease expires when the machine is asleep, on wake dhcpcd fails to request a new one, and falls-back to an IPv4LL address.

For example here we get a 24 hour lease:

2026-03-30T17:47:41.39296 daemon.info: Mar 30 18:47:41 dhcpcd[16013]: enp0s25: soliciting a DHCP lease
2026-03-30T17:47:41.40343 daemon.info: Mar 30 18:47:41 dhcpcd[16013]: enp0s25: offered 172.30.0.75 from 172.30.0.1
2026-03-30T17:47:41.41666 daemon.info: Mar 30 18:47:41 dhcpcd[16013]: enp0s25: probing address 172.30.0.75/24
2026-03-30T17:47:46.57513 daemon.info: Mar 30 18:47:46 dhcpcd[16013]: enp0s25: leased 172.30.0.75 for 86400 seconds

and here we are more than 24 hours later, waking from suspend:

2026-03-31T19:06:04.16030 daemon.info: Mar 31 20:06:04 dhcpcd[16013]: enp0s25: carrier lost
2026-03-31T19:06:04.20478 daemon.info: Mar 31 20:06:04 dhcpcd[16013]: enp0s25: deleting route to 172.30.0.0/24
2026-03-31T19:06:05.44700 daemon.info: Mar 31 20:06:05 dhcpcd[16013]: enp0s25: carrier acquired
2026-03-31T19:06:05.45060 daemon.info: Mar 31 20:06:05 dhcpcd[16013]: enp0s25: IAID 9b:22:66:d8
2026-03-31T19:06:06.62092 daemon.info: Mar 31 20:06:06 dhcpcd[16013]: enp0s25: soliciting a DHCP lease
2026-03-31T19:06:06.62894 daemon.err: Mar 31 20:06:06 dhcpcd[16013]: dhcp_openbpf: eloop_event_add: No such file or directory
2026-03-31T19:06:11.62179 daemon.info: Mar 31 20:06:11 dhcpcd[16013]: enp0s25: probing for an IPv4LL address
2026-03-31T19:06:16.06407 daemon.info: Mar 31 20:06:16 dhcpcd[16013]: enp0s25: using IPv4LL address 169.254.169.130
2026-03-31T19:06:16.06423 daemon.info: Mar 31 20:06:16 dhcpcd[16013]: enp0s25: adding route to 169.254.0.0/16
2026-03-31T19:06:16.06451 daemon.info: Mar 31 20:06:16 dhcpcd[16013]: enp0s25: adding default route

Restarting dhcpcd causes it to get a new lease and it works fine.

IPv6 works fine, I removed the lines from the logs above.

Using dhcpcd v10.3.0. I think this is appearing now as my distro (void) only updated from 10.1 a few weeks ago.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions