dhclient-script: add a minute to address lifetimes (#1188423)

http://lists.openstack.org/pipermail/openstack-operators/2015-January/006065.html
This commit is contained in:
Jiri Popelka 2015-04-21 10:26:09 +02:00
parent 8568b714e7
commit d12e0eb05e
2 changed files with 11 additions and 1 deletions

View File

@ -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}")"

View File

@ -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 <jpopelka@redhat.com> - 12:4.3.2-5
- dhclient-script: add a minute to address lifetimes (#1188423)
* Mon Apr 13 2015 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.2-4
- dhclient-script: amend previous change (#1210984)