Page MenuHomeVyOS Platform

Hide DHCP leases from interfaces without active DHCP client
Open, Requires assessmentPublicFEATURE REQUEST

Description

The command show dhcp client leases displays all the leases by parsing the ^dhclient_.*.lease$ files in /var/lib/dhcp/.
When the DHCP client is removed from an interface, a lease file stays there and the command continues to show leases from it.

Would be better to hide such leases by default. For example, we can filter lease files and show only those of them for which exists corresponding .pid files.

The code that handles this located in: https://github.com/vyos/vyatta-op/blob/bfec3bce801b15fda969a1bd97e51b9e19dfef93/scripts/vyatta-show-dhclient.pl

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Improvement (missing useful functionality)