Update the regression test so that there are actually two independent

networks involved, as opposed to two hosts on one network.

MFC after:	1 week
This commit is contained in:
George V. Neville-Neil 2007-03-24 13:47:16 +00:00
parent d986a9f435
commit 5a146d5125
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167866

View File

@ -11,7 +11,6 @@
#
# Expected Output: No failures.
ipbase="1"
netif="lo0"
spi="10000"
@ -19,8 +18,8 @@ echo "1..306"
#sysctl net.inet.ipsec.crypto_support=1 >/dev/null 2>&1
ifconfig $netif inet6 alias ${ipbase}::1/128
ifconfig $netif inet6 alias ${ipbase}::2/128
ifconfig $netif inet6 alias 1::1
ifconfig $netif inet6 alias 2::1
i=1
@ -60,13 +59,13 @@ for ecipher in \
setkey -F
setkey -FP
(echo "add -6 ${ipbase}::1 ${ipbase}::2 esp $spi -m transport -E $ealgo \"${ekey}\" -A $aalgo \"${akey}\" ;"
echo "add -6 ${ipbase}::2 ${ipbase}::1 esp `expr $spi + 1` -m transport -E $ealgo \"${ekey}\" -A $aalgo \"${akey}\" ;"
(echo "add -6 1::1 2::1 esp $spi -m transport -E $ealgo \"${ekey}\" -A $aalgo \"${akey}\" ;"
echo "add -6 2::1 1::1 esp `expr $spi + 1` -m transport -E $ealgo \"${ekey}\" -A $aalgo \"${akey}\" ;"
echo "spdadd -6 ${ipbase}::1 ${ipbase}::2 any -P out ipsec esp/transport//require;"
echo "spdadd -6 ${ipbase}::2 ${ipbase}::1 any -P in ipsec esp/transport//require;"
echo "spdadd -6 ${ipbase}::1 ${ipbase}::2 any -P in ipsec esp/transport//require;"
echo "spdadd -6 ${ipbase}::2 ${ipbase}::1 any -P out ipsec esp/transport//require;"
echo "spdadd -6 1::1 2::1 any -P out ipsec esp/transport//require;"
echo "spdadd -6 2::1 1::1 any -P in ipsec esp/transport//require;"
echo "spdadd -6 1::1 2::1 any -P in ipsec esp/transport//require;"
echo "spdadd -6 2::1 1::1 any -P out ipsec esp/transport//require;"
) | setkey -c >/dev/null 2>&1
if [ $? -eq 0 ]; then
echo "ok $i - setkey ${ealgo} ${ekey} ${aalgo} ${akey}"
@ -75,14 +74,14 @@ for ecipher in \
fi
i=$((i+1))
ping6 -c 1 -i 1 -S ${ipbase}::1 ${ipbase}::2 >/dev/null
ping6 -c 1 -i 1 -S 1::1 2::1 >/dev/null
if [ $? -eq 0 ]; then
echo "ok $i - test 1 ${ealgo} ${ekey} ${aalgo} ${akey}"
else
echo "not ok $i - test 1 ${ealgo} ${ekey} ${aalgo} ${akey}"
fi
i=$((i+1))
ping6 -c 1 -i 1 -S ${ipbase}::2 ${ipbase}::1 >/dev/null
ping6 -c 1 -i 1 -S 2::1 1::1 >/dev/null
if [ $? -eq 0 ]; then
echo "ok $i - test 2 ${ealgo} ${ekey} ${aalgo} ${akey}"
else
@ -95,5 +94,5 @@ done
setkey -F
setkey -FP
ifconfig $netif inet6 ${ipbase}::1 delete
ifconfig $netif inet6 ${ipbase}::2 delete
ifconfig $netif inet6 1::1 delete
ifconfig $netif inet6 2::1 delete