RHEL5 - rgmanger: fix handling of VIP v6
Fabio M. Di Nitto
fabbione@fedoraproject.org
Thu Aug 28 09:46:00 GMT 2008
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=9bf373dbb03a185e49e36db5075d50352436b9c1
Commit: 9bf373dbb03a185e49e36db5075d50352436b9c1
Parent: d437c7e1272941498e90d8ab939ca91b530f5d1f
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
AuthorDate: Thu Aug 28 11:36:11 2008 +0200
Committer: Fabio M. Di Nitto <fdinitto@redhat.com>
CommitterDate: Thu Aug 28 11:41:38 2008 +0200
rgmanger: fix handling of VIP v6
when using ip to handle ipv6 address, we need to speficify netmask on
add and remove operations, the same way is done in ipv4 code.
Fix bugzilla: #459582
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
rgmanager/src/resources/ip.sh | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/rgmanager/src/resources/ip.sh b/rgmanager/src/resources/ip.sh
index b3e7efd..ec69eb8 100755
--- a/rgmanager/src/resources/ip.sh
+++ b/rgmanager/src/resources/ip.sh
@@ -639,12 +639,16 @@ ipv6()
if [ $? -ne 0 ]; then
continue
fi
+ if [ "${addr/\/*/}" = "${addr}" ]; then
+ addr="$addr/$maskbits"
+ fi
ocf_log info "Adding IPv6 address $addr to $dev"
fi
if [ "$1" = "del" ]; then
if [ "${addr_exp/\/*/}" != "$ifaddr_exp" ]; then
continue
fi
+ addr=`/sbin/ip addr list | grep "$addr" | head -n 1 | awk '{print $2}'`
ocf_log info "Removing IPv6 address $addr from $dev"
fi
More information about the Cluster-cvs
mailing list