Signed-off-by: Robert Sander <[email protected]>
---
 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: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/

Reply via email to