Hi,

testing with David on Linux today uncovered differences between
"ip -6 route show" on Gentoo (only shows the active routing table)
and FC14 (also shows the ipv6 route cache).  The route cache is not
interesting, but distorts our tests, as it depends on what else was
going on on the machine instead of "explicit route/ifconfig settings
by OpenVPN".  So work around this.

Also, include the proposed change from Alon to test for iproute2 
existance with "-n".  More clean that way is.

gert
-- 
USENET is *not* the non-clickable part of WWW!
                                                           //www.muc.de/~gert/
Gert Doering - Munich, Germany                             g...@greenie.muc.de
fax: +49-89-35655025                        g...@net.informatik.tu-muenchen.de
From 0f3819a1fa53a32531aa37ea33caef77d8ca7d59 Mon Sep 17 00:00:00 2001
From: Gert Doering <g...@greenie.muc.de>
List-Post: openvpn-devel@lists.sourceforge.net
Date: Fri, 1 Jun 2012 18:13:09 +0300
Subject: [PATCH] t_client.sh iproute2 script fixes

Test for existance of "iproute2" with "-n" (Alon)

Work around "ip -6 route show" behaviour on FC14 where some parts of
the IPv6 route cache would be displayed, which has no relevance to
OpenVPN but breaks before/after comparison.

Signed-off-by: Gert Doering <g...@greenie.muc.de>
---
 tests/t_client.sh.in |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/t_client.sh.in b/tests/t_client.sh.in
index 92e4d2e..d58b821 100755
--- a/tests/t_client.sh.in
+++ b/tests/t_client.sh.in
@@ -86,12 +86,12 @@ fail()
 get_ifconfig_route()
 {
     # linux / iproute2? (-> if configure got a path)
-    if [ "@IPROUTE@" != "" ]
+    if [ -n "@IPROUTE@" ]
     then
        echo "-- linux iproute2 --"
        @IPROUTE@ addr show     | grep -v valid_lft
        @IPROUTE@ route show
-       @IPROUTE@ -6 route show | sed -e 's/expires [0-9]*sec //'
+       @IPROUTE@ -o -6 route show | grep -v ' cache' | sed -e 's/expires 
[0-9]*sec //'
        return
     fi
 
-- 
1.7.3.5

Attachment: pgpPyZpI_OVa6.pgp
Description: PGP signature

Reply via email to