dhcpcd
dhcpcd copied to clipboard
dhcpcd --dumplease without an interface fails to dump all leases
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 https://github.com/NetworkConfiguration/dhcpcd/issues/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).
This is because you started dhcpcd on eth0 but didn't limit that in your request to dump leases. Related to #271