Skip to content

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

@holmanb

Description

@holmanb

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).

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