Mailing List Archive

[PATCH] Patch to make Route RA IPv6 ready
Signed-off-by: Robert Sander <r.sander@heinlein-support.de>
---
heartbeat/Route | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/heartbeat/Route b/heartbeat/Route
index 7e28f03..3b775f1 100755
--- a/heartbeat/Route
+++ b/heartbeat/Route
@@ -201,7 +201,7 @@ route_stop() {
}

route_status() {
- show_output="$(ip route show $(create_route_spec) 2>/dev/null)"
+ show_output="$(ip $addr_family route show $(create_route_spec) 2>/dev/null)"
if [ $? -eq 0 ]; then
if [ -n "$show_output" ]; then
# "ip route show" returned zero, and produced output on
@@ -290,6 +290,12 @@ for binary in ip grep; do
done

route_validate || exit $?
+
+addr_family="-4"
+if echo ${OCF_RESKEY_destination} | grep -q ":" ; then
+ addr_family="-6"
+fi
+
case $__OCF_ACTION in
start) route_start;;
stop) route_stop;;
--
1.7.10.4

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[PATCH] Patch to make Route RA IPv6 ready [ In reply to ]
This little patch makes the Route RA IPv6 ready.

The only missing bit was the status report where "ip route show" will only output IPv4 routes.
This makes the original RA think that the IPv6 route is always down.


Signed-off-by: Robert Sander <r.sander@heinlein-support.de>
---
heartbeat/Route | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/heartbeat/Route b/heartbeat/Route
index 7e28f03..3b775f1 100755
--- a/heartbeat/Route
+++ b/heartbeat/Route
@@ -201,7 +201,7 @@ route_stop() {
}

route_status() {
- show_output="$(ip route show $(create_route_spec) 2>/dev/null)"
+ show_output="$(ip $addr_family route show $(create_route_spec) 2>/dev/null)"
if [ $? -eq 0 ]; then
if [ -n "$show_output" ]; then
# "ip route show" returned zero, and produced output on
@@ -290,6 +290,12 @@ for binary in ip grep; do
done

route_validate || exit $?
+
+addr_family="-4"
+if echo ${OCF_RESKEY_destination} | grep -q ":" ; then
+ addr_family="-6"
+fi
+
case $__OCF_ACTION in
start) route_start;;
stop) route_stop;;
--
1.7.10.4

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
[PATCH] Patch to make Route RA IPv6 ready [ In reply to ]
This little patch makes the Route RA IPv6 ready.

The only missing bit was the status report where "ip route show" will
only output IPv4 routes.
This makes the original RA think that the IPv6 route is always down.


Signed-off-by: Robert Sander <r.sander@heinlein-support.de>
---
heartbeat/Route | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/heartbeat/Route b/heartbeat/Route
index 7e28f03..3b775f1 100755
--- a/heartbeat/Route
+++ b/heartbeat/Route
@@ -201,7 +201,7 @@ route_stop() {
}

route_status() {
- show_output="$(ip route show $(create_route_spec) 2>/dev/null)"
+ show_output="$(ip $addr_family route show $(create_route_spec)
2>/dev/null)"
if [ $? -eq 0 ]; then
if [ -n "$show_output" ]; then
# "ip route show" returned zero, and produced output on
@@ -290,6 +290,12 @@ for binary in ip grep; do
done

route_validate || exit $?
+
+addr_family="-4"
+if echo ${OCF_RESKEY_destination} | grep -q ":" ; then
+ addr_family="-6"
+fi
+
case $__OCF_ACTION in
start) route_start;;
stop) route_stop;;
-- 1.7.10.4
--
Robert Sander
Heinlein Support GmbH
Schwedter Str. 8/9b, 10119 Berlin

http://www.heinlein-support.de

Tel: 030 / 405051-43
Fax: 030 / 405051-19

Zwangsangaben lt. §35a GmbHG:
HRB 93818 B / Amtsgericht Berlin-Charlottenburg,
Geschäftsführer: Peer Heinlein -- Sitz: Berlin
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: [PATCH] Patch to make Route RA IPv6 ready [ In reply to ]
On Thu, May 30, 2013 at 09:36:34AM +0200, Robert Sander wrote:
> This little patch makes the Route RA IPv6 ready.

Sorry for the huge delay.
Will make sure this is merged right away.

Thanks,
Lars


--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/