From 59380169042c1a7c4ec030ec27f937d8281e69fa Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Tue, 5 Aug 2014 16:23:26 +0200 Subject: [PATCH 1/8] dhclient-script: it's OK if the arping reply comes from our system (#1116004) --- dhclient-script | 13 ++++++++++--- dhcp.spec | 7 +++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/dhclient-script b/dhclient-script index 364bd94..4d9e6fb 100644 --- a/dhclient-script +++ b/dhclient-script @@ -720,9 +720,16 @@ case "${reason}" in if arping -D -q -c2 -I ${interface} ${new_ip_address}; then dhconfig exit_with_hooks 0 - else - # DAD failed, i.e. address is already in use - exit_with_hooks 1 + else # DAD failed, i.e. address is already in use + ARP_REPLY=$(arping -D -c2 -I ${interface} ${new_ip_address} | grep reply | awk '{print toupper($5)}' | cut -d "[" -f2 | cut -d "]" -f1) + OUR_MACS=$(ip link show | grep link | awk '{print toupper($2)}' | uniq) + if [[ "${OUR_MACS}" = *"${ARP_REPLY}"* ]]; then + # the reply can come from our system, that's OK (#1116004#c33) + dhconfig + exit_with_hooks 0 + else + exit_with_hooks 1 + fi fi ;; diff --git a/dhcp.spec b/dhcp.spec index 1ce972d..58fcf2d 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -18,7 +18,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.3.1 -Release: 0.3.%{prever}%{?dist} +Release: 0.4.%{prever}%{?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. @@ -117,7 +117,7 @@ the ISC DHCP service and relay agent. %package -n dhclient Summary: Provides the ISC DHCP client daemon and dhclient-script # dhclient-script requires: -Requires: coreutils grep hostname initscripts iproute iputils sed +Requires: coreutils grep hostname initscripts iproute iputils sed gawk Requires: %{name}-common = %{epoch}:%{version}-%{release} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} @@ -592,6 +592,9 @@ done %doc doc/html/ %changelog +* Tue Aug 05 2014 Jiri Popelka - 12:4.3.1-0.4.b1 +- dhclient-script: it's OK if the arping reply comes from our system (#1116004) + * Tue Jul 22 2014 Jiri Popelka - 12:4.3.1-0.3.b1 - Use network-online.target instead of network.target (#1120656) From 5505bb7689665c7e14650f2cd43b35a60c926bfd Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Tue, 12 Aug 2014 10:51:29 +0200 Subject: [PATCH 2/8] 4.3.1 --- .gitignore | 1 + dhcp.spec | 9 ++++++--- sources | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index dd2d16b..1b4a240 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,4 @@ /dhcp-4.3.0rc1.tar.gz /dhcp-4.3.0.tar.gz /dhcp-4.3.1b1.tar.gz +/dhcp-4.3.1.tar.gz diff --git a/dhcp.spec b/dhcp.spec index 58fcf2d..6726cf2 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -12,13 +12,13 @@ %global prever b1 #%%global VERSION %{version}-%{patchver} -#%%global VERSION %{version} -%global VERSION %{version}%{prever} +#%%global VERSION %{version}%{prever} +%global VERSION %{version} Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.3.1 -Release: 0.4.%{prever}%{?dist} +Release: 1%{?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. @@ -592,6 +592,9 @@ done %doc doc/html/ %changelog +* Tue Aug 12 2014 Jiri Popelka - 12:4.3.1-1 +- 4.3.1 + * Tue Aug 05 2014 Jiri Popelka - 12:4.3.1-0.4.b1 - dhclient-script: it's OK if the arping reply comes from our system (#1116004) diff --git a/sources b/sources index 7c76ced..3759676 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cf83991a90e1b5808bf03b3ee03e39f0 dhcp-4.3.1b1.tar.gz +b3a42ece3c7f2cd2e74a3e12ca881d20 dhcp-4.3.1.tar.gz From 991bd354d956cc2f31ba75689ddcca0021706f0b Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Thu, 14 Aug 2014 11:24:32 +0200 Subject: [PATCH 3/8] dhclient-script: PREINIT6: make sure link-local address is available (#1129500) --- dhclient-script | 8 ++++++++ dhcp.spec | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/dhclient-script b/dhclient-script index 4d9e6fb..13da000 100644 --- a/dhclient-script +++ b/dhclient-script @@ -710,6 +710,14 @@ case "${reason}" in # so the following is not needed anymore #ip -6 addr flush dev ${interface} scope global permanent + # we need a link-local address to be ready (not tentative) + for i in $(seq 50); do + # tentative flag == DAD is still not complete + tentative=$(ip -6 addr show dev ${interface} scope link | grep tentative) + [[ -z "${tentative}" ]] && exit_with_hooks 0 + sleep 0.1 + done + exit_with_hooks 0 ;; diff --git a/dhcp.spec b/dhcp.spec index 6726cf2..2fb34bb 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -18,7 +18,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.3.1 -Release: 1%{?dist} +Release: 2%{?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. @@ -592,6 +592,9 @@ done %doc doc/html/ %changelog +* Thu Aug 14 2014 Jiri Popelka - 12:4.3.1-2 +- dhclient-script: PREINIT6: make sure link-local address is available (#1129500) + * Tue Aug 12 2014 Jiri Popelka - 12:4.3.1-1 - 4.3.1 From efdf4e797d1b3266d2b320996871a8fd68f9c796 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Thu, 14 Aug 2014 11:37:56 +0200 Subject: [PATCH 4/8] dhclient-script: revert one older change This has been reverted upstream with: - Disable the gentle shutdown functionality until we can determine the best way to present it to remove or reduce the side effects. [ISC-Bugs #36066] --- dhclient-script | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/dhclient-script b/dhclient-script index 13da000..ca895b9 100644 --- a/dhclient-script +++ b/dhclient-script @@ -706,9 +706,8 @@ case "${reason}" in # ensure interface is up ip link set dev ${interface} up - # aborted client cleans after itself since 4.2.6 - # so the following is not needed anymore - #ip -6 addr flush dev ${interface} scope global permanent + # remove any stale addresses from aborted clients + ip -6 addr flush dev ${interface} scope global permanent # we need a link-local address to be ready (not tentative) for i in $(seq 50); do From b81510d1c4e2fd8f7cbe8da10168cd64aabe5c01 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Thu, 14 Aug 2014 14:53:19 +0200 Subject: [PATCH 5/8] dhclient-script: one more fix for #1129500 --- dhclient-script | 7 ++++--- dhcp.spec | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dhclient-script b/dhclient-script index ca895b9..ba89d97 100644 --- a/dhclient-script +++ b/dhclient-script @@ -711,9 +711,10 @@ case "${reason}" in # we need a link-local address to be ready (not tentative) for i in $(seq 50); do - # tentative flag == DAD is still not complete - tentative=$(ip -6 addr show dev ${interface} scope link | grep tentative) - [[ -z "${tentative}" ]] && exit_with_hooks 0 + linklocal=$(ip -6 addr show dev ${interface} scope link) + # tentative flag means DAD is still not complete + tentative=$(echo "${linklocal}" | grep tentative) + [[ -n "${linklocal}" && -z "${tentative}" ]] && exit_with_hooks 0 sleep 0.1 done diff --git a/dhcp.spec b/dhcp.spec index 2fb34bb..26da3e6 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -18,7 +18,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.3.1 -Release: 2%{?dist} +Release: 3%{?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. @@ -592,6 +592,9 @@ done %doc doc/html/ %changelog +* Thu Aug 14 2014 Jiri Popelka - 12:4.3.1-3 +- dhclient-script: one more fix for #1129500 + * Thu Aug 14 2014 Jiri Popelka - 12:4.3.1-2 - dhclient-script: PREINIT6: make sure link-local address is available (#1129500) From df80176a2d6ed4d814864c882960490927677d5d Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 16 Aug 2014 02:42:50 +0000 Subject: [PATCH 6/8] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- dhcp.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dhcp.spec b/dhcp.spec index 26da3e6..28c08c3 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -18,7 +18,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.3.1 -Release: 3%{?dist} +Release: 4%{?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. @@ -592,6 +592,9 @@ done %doc doc/html/ %changelog +* Sat Aug 16 2014 Fedora Release Engineering - 12:4.3.1-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Thu Aug 14 2014 Jiri Popelka - 12:4.3.1-3 - dhclient-script: one more fix for #1129500 From cc143483e58084c5e17213722822ddbecbc7f671 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Mon, 25 Aug 2014 18:48:14 +0200 Subject: [PATCH 7/8] spec: use -D with 'install' --- dhcp.spec | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/dhcp.spec b/dhcp.spec index 28c08c3..5138811 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -18,7 +18,7 @@ Summary: Dynamic host configuration protocol software Name: dhcp Version: 4.3.1 -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. @@ -375,8 +375,7 @@ popd %{__rm} -f %{buildroot}%{_sysconfdir}/dhcpd.conf.example # dhclient-script -%{__mkdir} -p %{buildroot}%{_sbindir} -%{__install} -p -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}/dhclient-script +%{__install} -D -p -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}/dhclient-script # README.dhclient.d %{__install} -p -m 0644 %{SOURCE2} . @@ -390,8 +389,7 @@ popd %{__install} -p -m 0755 %{SOURCE4} %{buildroot}%{_sysconfdir}/NetworkManager/dispatcher.d # pm-utils script to handle suspend/resume and dhclient leases -%{__mkdir} -p %{buildroot}%{_libdir}/pm-utils/sleep.d -%{__install} -p -m 0755 %{SOURCE5} %{buildroot}%{_libdir}/pm-utils/sleep.d +%{__install} -D -p -m 0755 %{SOURCE5} %{buildroot}%{_libdir}/pm-utils/sleep.d/56dhclient # systemd unit files mkdir -p %{buildroot}%{_unitdir} @@ -452,9 +450,7 @@ EOF EOF # Install dhcp.schema for LDAP configuration -%{__mkdir} -p %{buildroot}%{_sysconfdir}/openldap/schema -%{__install} -p -m 0644 -D contrib/ldap/dhcp.schema \ - %{buildroot}%{_sysconfdir}/openldap/schema +%{__install} -D -p -m 0644 contrib/ldap/dhcp.schema %{buildroot}%{_sysconfdir}/openldap/schema/dhcp.schema # Don't package libtool *.la files find ${RPM_BUILD_ROOT}/%{_libdir} -name '*.la' -exec '/bin/rm' '-f' '{}' ';'; @@ -592,6 +588,9 @@ done %doc doc/html/ %changelog +* Mon Aug 25 2014 Jiri Popelka - 12:4.3.1-5 +- spec: use -D with 'install' + * Sat Aug 16 2014 Fedora Release Engineering - 12:4.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 5bd17cb2c109a7d834d5bb891fe6dfe3298cecf1 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Mon, 25 Aug 2014 18:57:47 +0200 Subject: [PATCH 8/8] - dhclient-script: IPv6 address which fails DAD is auto-removed (#1133465) --- dhclient-script | 11 +++++++++-- dhcp.spec | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dhclient-script b/dhclient-script index ba89d97..e5a6830 100644 --- a/dhclient-script +++ b/dhclient-script @@ -575,8 +575,15 @@ add_ipv6_addr_with_DAD() { exit_with_hooks 3 fi if [ -z "${tentative}" ] ; then - # DAD is over - return 0 + addr=$(ip -6 addr show dev ${interface} \ + | grep ${new_ip6_address}/${new_ip6_prefixlen}) + if [ -n "${addr}" ]; then + # DAD is over + return 0 + else + # address was auto-removed (or not added at all) + exit_with_hooks 3 + fi fi done } diff --git a/dhcp.spec b/dhcp.spec index 5138811..f6be761 100644 --- a/dhcp.spec +++ b/dhcp.spec @@ -590,6 +590,8 @@ done %changelog * Mon Aug 25 2014 Jiri Popelka - 12:4.3.1-5 - spec: use -D with 'install' +- dhclient-script: IPv6 address which fails DAD is auto-removed when it was + added with valid_lft/preferred_lft other then 'forever' (#1133465) * Sat Aug 16 2014 Fedora Release Engineering - 12:4.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild