From b0cb903be602460892322e4a341670cd9c40efd8 Mon Sep 17 00:00:00 2001 From: Jiri Popelka Date: Wed, 13 Oct 2010 12:07:16 +0200 Subject: [PATCH] Fix BOUND6/RENEW6/REBIND6 in dhclient-script. --- dhclient-script | 11 +++++++---- 1 file 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