]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commitdiff
tests: 'route flush' doesn't work properly on Linux'
authorDaniel Lenski <dlenski@gmail.com>
Sun, 11 Apr 2021 16:37:34 +0000 (09:37 -0700)
committerDaniel Lenski <dlenski@gmail.com>
Sun, 11 Apr 2021 16:37:34 +0000 (09:37 -0700)
Need to use `ip route flush` in test scripts as a workaround:

# route flush
Flushing `inet' routing table not supported

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
tests/vpn-noroute
tests/vpn-routes

index a712004ec5a8db0b089cbfacaeb0b9191cf16bf2..69e03d363d719af07b6020cb38caf0a14d4359c5 100755 (executable)
@@ -136,6 +136,12 @@ while ! ${CMDNS1} ${IP} addr list dev ${TUNDEV} &>/dev/null; do
 done
 sleep 3 # XX: CI needs additional delay here
 
+if test "$NO_IPROUTE2" = 1;then
+    # XX: 'route flush' doesn't work properly on Linux
+    ${CMSNS1} ${IP} route flush cache 2>/dev/null
+    ${CMSNS1} ${IP} -6 route flush cache 2>/dev/null
+fi
+
 set -e
 echo " * ping remote address"
 
index 7e3c487cad90cab6c76b5fd5e8f0c8191767e4fd..56dca2dbe71fbbfa82e02fdb98b8f653ecae6423 100755 (executable)
@@ -133,6 +133,12 @@ while ! ${CMDNS1} ${IP} addr list dev ${TUNDEV} &>/dev/null; do
 done
 sleep 3 # XX: CI needs additional delay here
 
+if test "$NO_IPROUTE2" = 1;then
+    # XX: 'route flush' doesn't work properly on Linux
+    ${CMDNS1} ${IP} route flush cache 2>/dev/null
+    ${CMDNS1} ${IP} -6 route flush cache 2>/dev/null
+fi
+
 set -e
 echo " * ping remote address"