[dhcp] Fix BOUND6/RENEW6/REBIND6 in dhclient-script.

Jiří Popelka jpopelka at fedoraproject.org
Wed Oct 13 10:28:20 UTC 2010


commit b0cb903be602460892322e4a341670cd9c40efd8
Author: Jiri Popelka <jpopelka at redhat.com>
Date:   Wed Oct 13 12:07:16 2010 +0200

    Fix BOUND6/RENEW6/REBIND6 in dhclient-script.

 dhclient-script |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/dhclient-script b/dhclient-script
index 6961af5..72f4103 100755
--- a/dhclient-script
+++ b/dhclient-script
@@ -497,7 +497,7 @@ add_ipv6_addr_with_DAD() {
 dh6config() {
     case "${reason}" in
         BOUND6)
-            if [ -z "${new_ip6_address}" ] &&
+            if [ -z "${new_ip6_address}" ] ||
                [ -z "${new_ip6_prefixlen}" ]; then
                 exit_with_hooks 2
             fi
@@ -508,9 +508,12 @@ dh6config() {
             ;;
 
         RENEW6|REBIND6)
-            if [ -n "${new_ip6_prefixlen}" ] &&
-               [ -n "${new_ip6_address}" ] &&
-               [  ! "${new_ip6_address}" = "${old_ip6_address}" ]; then
+            if [ -z "${new_ip6_address}" ] ||
+               [ -z "${new_ip6_prefixlen}" ]; then
+                exit_with_hooks 2
+            fi
+
+            if [  ! "${new_ip6_address}" = "${old_ip6_address}" ]; then
                 add_ipv6_addr_with_DAD
             fi
 


More information about the scm-commits mailing list