]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
t_client.sh iproute2 script fixes
authorGert Doering <gert@greenie.muc.de>
Fri, 1 Jun 2012 15:13:09 +0000 (18:13 +0300)
committerDavid Sommerseth <davids@redhat.com>
Fri, 1 Jun 2012 15:28:36 +0000 (17:28 +0200)
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 <gert@greenie.muc.de>
Acked-by: David Sommerseth <davids@redhat.com>
Message-Id: 20120601151507.GE400@greenie.muc.de
URL: http://article.gmane.org/gmane.network.openvpn.devel/6637
Signed-off-by: David Sommerseth <davids@redhat.com>
tests/t_client.sh.in

index 92e4d2e1b37d29def2b085c53e000d5029d46a49..d58b82109d9075814e24f9d01711fe25d3d61a3d 100755 (executable)
@@ -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