mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-10 08:12:03 +08:00
Merge branch 'feature-expand_no-ipv6-ocv3_test' into 'master'
Expand no-ipv6-ocv3 test See merge request openconnect/ocserv!414
This commit is contained in:
+15
-4
@@ -39,9 +39,6 @@ if test "$(id -u)" != "0";then
|
||||
exit 77
|
||||
fi
|
||||
|
||||
|
||||
echo "Testing that ocserv doesn't assign IPv6 address on unknown clients... "
|
||||
|
||||
function finish {
|
||||
set +e
|
||||
echo " * Cleaning up..."
|
||||
@@ -67,6 +64,8 @@ fi
|
||||
${CMDNS2} ${SERV} -p ${PIDFILE} -f -c ${CONFIG} ${DEBUG} & PID=$!
|
||||
wait_server $PID
|
||||
|
||||
echo "Testing that ocserv doesn't assign IPv6 address on (ancient) OpenConnect v3 clients... "
|
||||
|
||||
echo -n "Connecting to setup interface... "
|
||||
echo "test" | ${CMDNS1} timeout 15s $OPENCONNECT -v $ADDRESS:$PORT --useragent="Open AnyConnect VPN Agent v3" --passwd-on-stdin -u test --servercert=pin-sha256:xp3scfzy3rOQsv9NcOve/8YVVv+pHr4qNCXEXrNl5s8= -s /bin/true >${TMPFILE} 2>&1
|
||||
|
||||
@@ -75,7 +74,19 @@ echo ok
|
||||
cat ${TMPFILE}|grep X-CSTP-Split-Include|grep 'fd63:' >/dev/null
|
||||
if test $? = 0;then
|
||||
cat ${TMPFILE}|grep X-CSTP-Split
|
||||
echo "Found route that shouldn't be there"
|
||||
echo "Found IPv6 route that shouldn't be there"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Testing that ocserv DOES assign IPv6 address on totally unknown clients... "
|
||||
|
||||
echo -n "Connecting to setup interface... "
|
||||
echo "test" | ${CMDNS1} timeout 15s $OPENCONNECT -v $ADDRESS:$PORT --useragent="/* An unknown user agent */" --passwd-on-stdin -u test --servercert=pin-sha256:xp3scfzy3rOQsv9NcOve/8YVVv+pHr4qNCXEXrNl5s8= -s /bin/true >${TMPFILE} 2>&1
|
||||
|
||||
cat ${TMPFILE}|grep X-CSTP-Split-Include|grep 'fd63:' >/dev/null
|
||||
if test $? != 0;then
|
||||
cat ${TMPFILE}|grep X-CSTP-Split
|
||||
echo "Did not find IPv6 which SHOULD be there"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user