dhclient-script: it's OK if the arping reply comes from our system (#1116004)

This commit is contained in:
Jiri Popelka 2014-08-05 16:23:26 +02:00
parent 0b1fc62ff4
commit 5938016904
2 changed files with 15 additions and 5 deletions

View File

@ -720,9 +720,16 @@ case "${reason}" in
if arping -D -q -c2 -I ${interface} ${new_ip_address}; then if arping -D -q -c2 -I ${interface} ${new_ip_address}; then
dhconfig dhconfig
exit_with_hooks 0 exit_with_hooks 0
else else # DAD failed, i.e. address is already in use
# 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)
exit_with_hooks 1 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 fi
;; ;;

View File

@ -18,7 +18,7 @@
Summary: Dynamic host configuration protocol software Summary: Dynamic host configuration protocol software
Name: dhcp Name: dhcp
Version: 4.3.1 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 # NEVER CHANGE THE EPOCH on this package. The previous maintainer (prior to
# dcantrell maintaining the package) made incorrect use of the epoch and # 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. # 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 %package -n dhclient
Summary: Provides the ISC DHCP client daemon and dhclient-script Summary: Provides the ISC DHCP client daemon and dhclient-script
# dhclient-script requires: # 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}-common = %{epoch}:%{version}-%{release}
Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-libs%{?_isa} = %{epoch}:%{version}-%{release}
@ -592,6 +592,9 @@ done
%doc doc/html/ %doc doc/html/
%changelog %changelog
* Tue Aug 05 2014 Jiri Popelka <jpopelka@redhat.com> - 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 <jpopelka@redhat.com> - 12:4.3.1-0.3.b1 * Tue Jul 22 2014 Jiri Popelka <jpopelka@redhat.com> - 12:4.3.1-0.3.b1
- Use network-online.target instead of network.target (#1120656) - Use network-online.target instead of network.target (#1120656)