From 513ea3b69748fb38249e46d101f636f42d30debb Mon Sep 17 00:00:00 2001 From: CentOS Buildsys Date: Jan 24 2014 20:28:16 +0000 Subject: import dhcp-4.2.5-27.el7.src.rpm --- diff --git a/SOURCES/dhclient-script b/SOURCES/dhclient-script index ac2b7ac..30a4d48 100644 --- a/SOURCES/dhclient-script +++ b/SOURCES/dhclient-script @@ -3,7 +3,7 @@ # dhclient-script: Network interface configuration script run by # dhclient based on DHCP client communication # -# Copyright (C) 2008, 2009, 2010 Red Hat, Inc. +# Copyright (C) 2008-2014 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ # along with this program. If not, see . # # Author(s): David Cantrell +# Jiri Popelka # # ---------- # This script is a rewrite/reworking on dhclient-script originally @@ -109,6 +110,7 @@ make_resolv_conf() { [ -n "${new_domain_name_servers}" ] || [ -n "${new_domain_search}" ]; then rscf="$(mktemp ${TMPDIR:-/tmp}/XXXXXX)" + [[ -z "${rscf}" ]] && return echo "; generated by /usr/sbin/dhclient-script" > ${rscf} if [ -n "${SEARCH}" ]; then @@ -148,6 +150,7 @@ make_resolv_conf() { elif [ -n "${new_dhcp6_name_servers}" ] || [ -n "${new_dhcp6_domain_search}" ]; then rscf="$(mktemp ${TMPDIR:-/tmp}/XXXXXX)" + [[ -z "${rscf}" ]] && return echo "; generated by /usr/sbin/dhclient-script" > ${rscf} if [ -n "${SEARCH}" ]; then @@ -351,7 +354,8 @@ dhconfig() { [ ! "${old_broadcast_address}" = "${new_broadcast_address}" ] || [ ! "${old_routers}" = "${new_routers}" ] || [ ! "${old_interface_mtu}" = "${new_interface_mtu}" ]; then - ip -4 addr add ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} >/dev/null 2>&1 + ip -4 addr add ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} \ + valid_lft ${new_dhcp_lease_time} preferred_lft ${new_dhcp_lease_time} >/dev/null 2>&1 ip link set dev ${interface} up # The 576 MTU is only used for X.25 and dialup connections @@ -479,6 +483,9 @@ dhconfig() { fi fi + else # RENEW||REBIND - only update address lifetimes + ip -4 addr change ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} \ + valid_lft ${new_dhcp_lease_time} preferred_lft ${new_dhcp_lease_time} >/dev/null 2>&1 fi if [ ! "${new_ip_address}" = "${alias_ip_address}" ] && @@ -543,7 +550,8 @@ dhconfig() { # using that address for traffic. add_ipv6_addr_with_DAD() { ip -6 addr add ${new_ip6_address}/${new_ip6_prefixlen} \ - dev ${interface} scope global + dev ${interface} scope global valid_lft ${new_max_life} \ + preferred_lft ${new_preferred_life} # repeatedly test whether newly added address passed # duplicate address detection (DAD) @@ -595,6 +603,10 @@ dh6config() { if [ ! "${new_ip6_address}" = "${old_ip6_address}" ]; then add_ipv6_addr_with_DAD + else # only update address lifetimes + ip -6 addr change ${new_ip6_address}/${new_ip6_prefixlen} \ + dev ${interface} scope global valid_lft ${new_max_life} \ + preferred_lft ${new_preferred_life} fi if [ ! "${new_dhcp6_name_servers}" = "${old_dhcp6_name_servers}" ] || @@ -766,7 +778,9 @@ case "${reason}" in ip -4 addr flush dev ${interface} label ${interface}:0 >/dev/null 2>&1 fi - ip -4 addr add ${new_ip_address}/${new_prefix} broadcast ${new_broadcast_address} dev ${interface} + ip -4 addr add ${new_ip_address}/${new_prefix} \ + broadcast ${new_broadcast_address} dev ${interface} \ + valid_lft ${new_dhcp_lease_time} preferred_lft ${new_dhcp_lease_time} set ${new_routers} if ping -q -c 1 -w 10 -I ${interface} ${1}; then diff --git a/SPECS/dhcp.spec b/SPECS/dhcp.spec index f7ff8d2..b858e34 100644 --- a/SPECS/dhcp.spec +++ b/SPECS/dhcp.spec @@ -18,7 +18,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.2.5 -Release: 23%{?dist} +Release: 27%{?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. @@ -619,6 +619,18 @@ done %changelog +* Fri Jan 24 2014 Daniel Mach - 12:4.2.5-27 +- Mass rebuild 2014-01-24 + +* Mon Jan 13 2014 Jiri Popelka - 12:4.2.5-26 +- update address lifetimes on RENEW/RENEW6 (#1032809) + +* Fri Dec 27 2013 Daniel Mach - 12:4.2.5-25 +- Mass rebuild 2013-12-27 + +* Fri Nov 22 2013 Jiri Popelka - 12:4.2.5-24 +- dhclient-script: set address lifetimes (#1032809) + * Tue Nov 05 2013 Jiri Popelka - 12:4.2.5-23 - dhcpd rejects the udp packet with checksum=0xffff (#1016143)