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

feat(linux.net): Add a Dhcp Server lease file for interface #4905

Merged
merged 24 commits into from
Nov 2, 2023

Conversation

pierantoniomerlino
Copy link
Contributor

@pierantoniomerlino pierantoniomerlino commented Oct 20, 2023

Note: We are using the Conventional Commits convention for our pull request titles. Please take a look at the PR title format document for the supported types and scopes.

This PR implements a specific lease file for each network interface when using the DHCP server.

Description of the solution adopted: Currently if two DHCP servers are running in the system, the DHCP server instances will use the same default lease file in /var/lib/dhcp/dhcpd.leases. To avoid this, this PR use the same approach of the DHCP server configuration file and pid file that have a per interface file.
The specific lease file is added in the configuration file for every supported DHCP server (dhcpd, udhcpd and dnsmasq).

Moreover, a limited refactoring is done in order to simply the creation of the configuration string for the tools used as DHCP servers. A set of converters from the DhcpServerConfigIP to String are implemented.

Finally, the DhcpLeaseTool class has been updated to take into account the new lease files.

@pierantoniomerlino pierantoniomerlino force-pushed the dhcp_lease_files branch 2 times, most recently from 089a6a5 to 6034f7f Compare October 24, 2023 07:42
@pierantoniomerlino pierantoniomerlino marked this pull request as ready for review October 30, 2023 14:32
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
Signed-off-by: pierantoniomerlino <[email protected]>
@MMaiero MMaiero merged commit aed5f19 into develop Nov 2, 2023
@MMaiero MMaiero deleted the dhcp_lease_files branch November 2, 2023 11:22
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

Successfully merging this pull request may close these issues.

3 participants