public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* master - rgmanger: fix handling of VIP v6
@ 2008-08-28  9:49 Fabio M. Di Nitto
  0 siblings, 0 replies; only message in thread
From: Fabio M. Di Nitto @ 2008-08-28  9:49 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=aeda124b395dd5ad7a115b934a7d1ed8a6ca17c7
Commit:        aeda124b395dd5ad7a115b934a7d1ed8a6ca17c7
Parent:        4e28e072aa4af4de699865e7b6809fbda98af792
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:45:54 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 112c5b2..245dcf5 100644
--- a/rgmanager/src/resources/ip.sh
+++ b/rgmanager/src/resources/ip.sh
@@ -619,12 +619,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
 		


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-08-28  9:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-28  9:49 master - rgmanger: fix handling of VIP v6 Fabio M. Di Nitto

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).