[dhcp/f20] dhclient-script: don't ping router (#1055181)

Jiří Popelka jpopelka at fedoraproject.org
Tue Jan 21 09:40:15 UTC 2014


commit ed73e719090e587163a23f01a075b3d467ee482a
Author: Jiri Popelka <jpopelka at redhat.com>
Date:   Tue Jan 21 10:40:28 2014 +0100

    dhclient-script: don't ping router (#1055181)

 dhclient-script |   12 ++----------
 dhcp.spec       |    5 ++++-
 2 files changed, 6 insertions(+), 11 deletions(-)
---
diff --git a/dhclient-script b/dhclient-script
index 322ee6a..05e4205 100644
--- a/dhclient-script
+++ b/dhclient-script
@@ -275,16 +275,8 @@ is_router_reachable() {
 
     if [ ! "${routersubnet}" = "${mysubnet}" ]; then
         ip -4 route add ${router}/32 dev ${interface}
-        if [ $? -eq 0 ]; then
-            if ping -q -c1 -w2 -I ${interface} ${router}; then
-                return 0
-            else
-                logmessage "DHCP router ${router} is unreachable on DHCP subnet ${mysubnet} router subnet ${routersubnet}"
-                ip route del ${router}/32 dev ${interface}
-                return 1
-            fi
-        else
-            logmessage "failed to create host router for unreachable router ${router} not on subnet ${mysubnet}"
+        if [ "$?" -ne 0 ]; then
+            logmessage "failed to create host route for ${router}"
             return 1
         fi
     fi
diff --git a/dhcp.spec b/dhcp.spec
index 3618df7..1f41b8c 100644
--- a/dhcp.spec
+++ b/dhcp.spec
@@ -18,7 +18,7 @@
 Summary:  Dynamic host configuration protocol software
 Name:     dhcp
 Version:  4.2.5
-Release:  29%{?dist}
+Release:  30%{?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.
@@ -641,6 +641,9 @@ done
 
 
 %changelog
+* Tue Jan 21 2014 Jiri Popelka <jpopelka at redhat.com> - 12:4.2.5-30
+- dhclient-script: don't ping router (#1055181)
+
 * Mon Jan 13 2014 Jiri Popelka <jpopelka at redhat.com> - 12:4.2.5-29
 - update address lifetimes on RENEW/RENEW6 (#1032809)
 


More information about the scm-commits mailing list