From 3c1fe8380f56cb17766560722f581fa34ae82097 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Aug 05 2014 14:27:28 +0000 Subject: dhclient-script: it's OK if the arping reply comes from our system (#1116004) --- 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 52dcc9c..6a0e888 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.6.%{prever}%{?dist} +Release: 0.7.%{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. @@ -153,7 +153,7 @@ Summary: Provides the ISC DHCP client daemon and dhclient-script Provides: dhclient = %{epoch}:%{version}-%{release} Obsoletes: dhclient < 12:4.3.1-0.6.b1 # 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} @@ -650,6 +650,9 @@ done %doc doc/html/ %changelog +* Tue Aug 05 2014 Jiri Popelka - 12:4.3.1-0.7.b1 +- dhclient-script: it's OK if the arping reply comes from our system (#1116004) + * Tue Aug 05 2014 Jiri Popelka - 12:4.3.1-0.6.b1 - subpackage dhclient -> dhcp-client