Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dhcpcd --dumplease without an interface fails to dump all leases #287

Open
holmanb opened this issue Jan 20, 2024 · 1 comment
Open

dhcpcd --dumplease without an interface fails to dump all leases #287

holmanb opened this issue Jan 20, 2024 · 1 comment

Comments

@holmanb
Copy link

holmanb commented Jan 20, 2024

Per the docs, all interfaces should be dumped:

-U, --dumplease [interface]
         Dumps the current lease for the interface to stdout.  If no interface is given then all
        interfaces are dumped.  

However, that is not the behavior that I observe:

# pgrep -a dhcpcd
73220 dhcpcd: eth0 [ip4] [ip6]
73221 dhcpcd: [privileged proxy] eth0 [ip4] [ip6]
73222 dhcpcd: [network proxy] eth0 [ip4] [ip6]
73223 dhcpcd: [control proxy] eth0 [ip4] [ip6]
73226 dhcpcd: [DHCP6 proxy] fe80::222:48ff:fe2f:d94
73229 dhcpcd: [BPF ARP] eth0 10.0.0.4
73240 dhcpcd: [BOOTP proxy] 10.0.0.4
# dhcpcd --dumplease 
dhcpcd is not running
# pgrep -a dhcpcd
73220 dhcpcd: eth0 [ip4] [ip6]
73221 dhcpcd: [privileged proxy] eth0 [ip4] [ip6]
73222 dhcpcd: [network proxy] eth0 [ip4] [ip6]
73223 dhcpcd: [control proxy] eth0 [ip4] [ip6]
73226 dhcpcd: [DHCP6 proxy] fe80::222:48ff:fe2f:d94
73229 dhcpcd: [BPF ARP] eth0 10.0.0.4
73240 dhcpcd: [BOOTP proxy] 10.0.0.4

I haven't dug into why this happens yet, it's not directly a use case of mine but the fact that the documented behavior is broken is relevant to the two fixes I have for #285 - one fix would break the documented user interface, the other fix would not (but the second fix leaves in place the unreliable "wait on data in the pipe" semantics).

@rsmarples
Copy link
Member

This is because you started dhcpcd on eth0 but didn't limit that in your request to dump leases.
Related to #271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants