public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: "Fabio M. Di Nitto" <fabbione@fedoraproject.org>
To: cluster-cvs-relay@redhat.com
Subject: STABLE2 - rgmanger: fix handling of VIP v6
Date: Thu, 28 Aug 2008 12:54:00 -0000	[thread overview]
Message-ID: <20080828094822.0387D120378@lists.fedorahosted.org> (raw)

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=e4b12524d8b99edff1fac8c6680aa4fd047dec9f
Commit:        e4b12524d8b99edff1fac8c6680aa4fd047dec9f
Parent:        7087a7d5e8c9601a9f405ee71befa3db90256481
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:48:06 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
 		


                 reply	other threads:[~2008-08-28  9:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080828094822.0387D120378@lists.fedorahosted.org \
    --to=fabbione@fedoraproject.org \
    --cc=cluster-cvs-relay@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).