Skip to content

Commit e6a362b

Browse files
Perform better calculations for renew and rebind times
By default DHCP servers usually omits the renew and rebind times, which then cause the client to calculate them to 50% and 85% of the total lease lifetime. With this change we just make it explicit, so no surprises happens.
1 parent dd437f9 commit e6a362b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

defaults/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ kea_dhcp_valid_lifetime: 6000
6262
kea_dhcp4_valid_lifetime: "{{ kea_dhcp_valid_lifetime }}"
6363
kea_dhcp6_valid_lifetime: "{{ kea_dhcp_valid_lifetime }}"
6464

65-
kea_dhcp_renew_timer: 900
65+
kea_dhcp_renew_timer: "{{ (kea_dhcp_valid_lifetime|float * 0.5) | int }}"
6666
kea_dhcp4_renew_timer: "{{ kea_dhcp_renew_timer }}"
6767
kea_dhcp6_renew_timer: "{{ kea_dhcp_renew_timer }}"
6868

69-
kea_dhcp_rebind_timer: 1000
69+
kea_dhcp_rebind_timer: "{{ (kea_dhcp_valid_lifetime|float * 0.85) | int }}"
7070
kea_dhcp4_rebind_timer: "{{ kea_dhcp_rebind_timer }}"
7171
kea_dhcp6_rebind_timer: "{{ kea_dhcp_rebind_timer }}"
7272

0 commit comments

Comments
 (0)