You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(dhcp): Send DHCPRELEASE on container teardown
When a container using DHCP is torn down, its lease is left active on the
DHCP server until it expires. This can be problematic in environments
with small IP pools or long lease times. In setups using Dynamic DNS (DDNS),
it can also lead to stale DNS records.
This change introduces the capability for netavark to send a DHCPRELEASE
message to the DHCP server when a container's network is torn down.
This is implemented by:
- Adding a `release_lease` method to the `DhcpV4Service` in `dhcp_service.rs`,
which wraps the `release` function from the underlying mozim client.
- Wrapped DhcpV4Service inside Arc<> share that to the process_client_stream
function and then also store it in the task map
- used it in process_client_stream task and also in the teardown function to
send the DHCPRELEASE message
0 commit comments