mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
tests: check whether the firewall rules have been applied with restrict-user-to-routes
This commit is contained in:
@@ -91,21 +91,21 @@ PID=`cat ${srcdir}/pid1.$$`
|
||||
# The client IP depends on the username so it shouldn't change.
|
||||
ping -w 5 192.168.79.1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
ping -w 5 192.168.79.1 -s 1500
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping ocserv"
|
||||
stop
|
||||
fi
|
||||
|
||||
ping6 -w 5 fd91:6d87:7341:db6a::1
|
||||
if test $? != 0;then
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
echo "Cannot ping the IPv6 of ocserv"
|
||||
stop
|
||||
fi
|
||||
@@ -119,7 +119,7 @@ nuttcp -T 10 -t 192.168.79.1
|
||||
if test $? != 0;then
|
||||
echo "Cannot send to ocserv"
|
||||
exit 77
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
stop
|
||||
fi
|
||||
|
||||
@@ -127,14 +127,14 @@ nuttcp -T 10 -r 192.168.79.1
|
||||
if test $? != 0;then
|
||||
echo "Cannot recv from ocserv"
|
||||
exit 77
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
stop
|
||||
fi
|
||||
fi
|
||||
|
||||
sleep 2
|
||||
|
||||
kill $PID
|
||||
kill -INT $PID
|
||||
|
||||
sleep 4
|
||||
|
||||
|
||||
Reference in New Issue
Block a user