diff --git a/dhclient-script b/dhclient-script index eba6f13..e7c713c 100644 --- a/dhclient-script +++ b/dhclient-script @@ -666,6 +666,13 @@ CONFIG="${interface}" need_config "${CONFIG}" source_config >/dev/null 2>&1 +# In case there's some delay in rebinding, it might happen, that the valid_lft drops to 0, +# address is removed by kernel and then re-added few seconds later by dhclient-script. +# With this work-around the address lives a minute longer. +# "4294967235" = infinite (forever) - 60 +[[ "${new_dhcp_lease_time}" -lt "4294967235" ]] && new_dhcp_lease_time=$((new_dhcp_lease_time + 60)) +[[ "${new_max_life}" -lt "4294967235" ]] && new_max_life=$((new_max_life + 60)) + new_prefix="$(get_prefix "${new_ip_address}" "${new_subnet_mask}")" old_prefix="$(get_prefix "${old_ip_address}" "${old_subnet_mask}")" alias_prefix="$(get_prefix "${alias_ip_address}" "${alias_subnet_mask}")" diff --git a/dhcp.spec b/dhcp.spec index f832934..ee9af0d 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -18,7 +18,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.3.2 -Release: 4%{?dist} +Release: 5%{?dist} # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to # dcantrell maintaining the package) made incorrect use of the epoch and # that's why it is at 12 now. It should have never been used, but it was. @@ -675,6 +675,9 @@ done %doc doc/html/ %changelog +* Tue Apr 21 2015 Jiri Popelka - 12:4.3.2-5 +- dhclient-script: add a minute to address lifetimes (#1188423) + * Mon Apr 13 2015 Jiri Popelka - 12:4.3.2-4 - dhclient-script: amend previous change (#1210984)