]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
testing: Adapt tests to retransmission settings and reduce DPD delay/timeout
authorTobias Brunner <tobias@strongswan.org>
Thu, 5 Nov 2015 13:55:14 +0000 (14:55 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 9 Nov 2015 14:18:34 +0000 (15:18 +0100)
26 files changed:
testing/tests/ha/active-passive/evaltest.dat
testing/tests/ikev1/dpd-clear/description.txt
testing/tests/ikev1/dpd-clear/evaltest.dat
testing/tests/ikev1/dpd-clear/hosts/moon/etc/ipsec.conf
testing/tests/ikev1/dpd-restart/description.txt
testing/tests/ikev1/dpd-restart/evaltest.dat
testing/tests/ikev1/dpd-restart/hosts/carol/etc/ipsec.conf
testing/tests/ikev1/rw-initiator-only/hosts/dave/etc/strongswan.conf
testing/tests/ikev2/dpd-clear/description.txt
testing/tests/ikev2/dpd-clear/evaltest.dat
testing/tests/ikev2/dpd-hold/evaltest.dat
testing/tests/ikev2/dpd-restart/evaltest.dat
testing/tests/ikev2/dynamic-initiator/description.txt
testing/tests/ikev2/inactivity-timeout/evaltest.dat
testing/tests/ikev2/ocsp-timeouts-good/description.txt
testing/tests/ikev2/ocsp-timeouts-good/hosts/winnetou/etc/openssl/ocsp/ocsp.cgi
testing/tests/ikev2/rw-initiator-only/hosts/dave/etc/strongswan.conf
testing/tests/openssl-ikev2/rw-suite-b-128/hosts/dave/etc/strongswan.conf
testing/tests/openssl-ikev2/rw-suite-b-192/hosts/dave/etc/strongswan.conf
testing/tests/tnc/tnccs-11-radius-pts/hosts/dave/etc/strongswan.conf
testing/tests/tnc/tnccs-20-os-pts/hosts/dave/etc/strongswan.conf
testing/tests/tnc/tnccs-20-pdp-eap/hosts/carol/etc/strongswan.conf
testing/tests/tnc/tnccs-20-pdp-eap/hosts/dave/etc/strongswan.conf
testing/tests/tnc/tnccs-20-pts-no-ecc/hosts/dave/etc/strongswan.conf
testing/tests/tnc/tnccs-20-pts/hosts/dave/etc/strongswan.conf
testing/tests/tnc/tnccs-20-pts/hosts/moon/etc/strongswan.conf

index 448f283f11bc839452c90d467e2636daa1587dfe..9af5c4c02bfc40a6cb3d1321b9564904e0daeb22 100644 (file)
@@ -16,7 +16,7 @@ dave:: ping -c 1 PH_IP_VENUS::64 bytes from PH_IP_VENUS: icmp_req=1::YES
 alice::ip xfrm policy flush::no output expected::NO
 alice::ip xfrm state flush::no output expected::NO
 alice::killall -9 starter charon::no output expected::NO
-carol::sleep 3::no output expected::NO
+carol::sleep 2::no output expected::NO
 moon:: cat /var/log/daemon.log::no heartbeat received, taking all segments::YES
 moon:: ipsec status 2> /dev/null::rw.*ESTABLISHED.*mars.strongswan.org.*carol@strongswan.org::YES
 moon:: ipsec status 2> /dev/null::rw.*ESTABLISHED.*mars.strongswan.org.*dave@strongswan.org::YES
index 7f62dc57638788286a2f3edce29a28305f6ec80d..0fb2f106492e319a802c4385056e3feaa59c8140 100644 (file)
@@ -1,5 +1,5 @@
 The roadwarrior <b>carol</b> sets up an IPsec tunnel connection to the gateway <b>moon</b>
 which in turn activates <b>Dead Peer Detection</b> (DPD) with a polling interval of 10 s.
 When the network connectivity between <b>carol</b> and <b>moon</b> is forcefully disrupted,
-<b>moon</b> clears the connection after 4 unsuccessful retransmits.
+<b>moon</b> clears the connection after a number of unsuccessful retransmits.
 
index f6f18212c28a628a3cdd142f82f617f476e581e3..8d4fa03a86c54ad8fdbc7f3b237a92262aa55479 100644 (file)
@@ -1,7 +1,7 @@
 carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
 carol::iptables -A INPUT -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
-moon:: sleep 60::no output expected::NO
+moon:: sleep 16::no output expected::NO
 moon:: cat /var/log/daemon.log::sending DPD request::YES
-moon::cat /var/log/daemon.log::DPD check timed out, enforcing DPD action::YES
+moon:: cat /var/log/daemon.log::DPD check timed out, enforcing DPD action::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED::NO
index 83f2849a49d68bbb9111522bd162f2a899fc68e4..9219e70283f2d5d4857248436079b5dda75d2c66 100644 (file)
@@ -9,8 +9,8 @@ conn %default
        keyingtries=1
        keyexchange=ikev1
        dpdaction=clear
-       dpddelay=10
-       dpdtimeout=45
+       dpddelay=5
+       dpdtimeout=15
 
 conn rw
        left=PH_IP_MOON
index 410d3d636ff3e428eebbea6041da55e4afa9dfbe..6f4af9439341af6e41e0df566bf18937b0f52bbe 100644 (file)
@@ -1,7 +1,7 @@
 The roadwarrior <b>carol</b> sets up an IPsec tunnel connection to the gateway
 <b>moon</b>. Both end points activate <b>Dead Peer Detection</b> (DPD) with a
-polling interval of 10 s. When the network connectivity between <b>carol</b>
-and <b>moon</b> is forcefully disrupted for a duration of 100 s, <b>moon</b>
-clears the connection after 4 unsuccessful retransmits whereas <b>carol</b>
+polling interval of 10s. When the network connectivity between <b>carol</b>
+and <b>moon</b> is forcefully disrupted for a duration of 100s, <b>moon</b>
+clears the connection after a number of unsuccessful retransmits whereas <b>carol</b>
 also takes down the connection but immediately tries to reconnect which succeeds
 as soon as the connection becomes available again.
index 6a749b8262ff8d45c0e4d9fcc80fc45ab9f7d207..91803a3f1410fd67c4ed9ec7877558d8397a5147 100644 (file)
@@ -2,12 +2,12 @@ carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
 moon:: iptables -A INPUT -i eth0 -s PH_IP_CAROL -j DROP::no output expected::NO
 carol::iptables -A INPUT -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
-carol::sleep 60::no output expected::NO
+carol::sleep 16::no output expected::NO
 carol::cat /var/log/daemon.log::sending DPD request::YES
 carol::cat /var/log/daemon.log::DPD check timed out, enforcing DPD action::YES
 carol::cat /var/log/daemon.log::restarting CHILD_SA home::YES
 carol::iptables -D INPUT -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
 moon:: iptables -D INPUT -i eth0 -s PH_IP_CAROL -j DROP::no output expected::NO
-carol::sleep 10::no output expected::NO
+carol::sleep 1::no output expected::NO
 carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
index d3c105c310aaf6b88b28f821bb1692c7529aeee9..4e142d699d704797d715ff63d5795c7c85176e77 100644 (file)
@@ -9,8 +9,8 @@ conn %default
        keyingtries=1
        keyexchange=ikev1
        dpdaction=restart
-        dpddelay=10
-       dpdtimeout=45
+       dpddelay=5
+       dpdtimeout=15
 
 conn home
        left=PH_IP_CAROL
index 2b80853c64ed4d602b36376ed4731b7feadfd329..094e0effa49787b341ff807dab8b35052c18de35 100644 (file)
@@ -2,8 +2,4 @@
 
 charon {
   load = test-vectors aes des sha1 sha2 md5 pem pkcs1 pkcs8 gmp random nonce x509 curl revocation hmac xcbc cmac ctr ccm gcm stroke kernel-netlink socket-default updown
-
-  retransmit_timeout = 2
-  retransmit_base = 1.5
-  retransmit_tries = 3 
 }
index 7f62dc57638788286a2f3edce29a28305f6ec80d..0fb2f106492e319a802c4385056e3feaa59c8140 100644 (file)
@@ -1,5 +1,5 @@
 The roadwarrior <b>carol</b> sets up an IPsec tunnel connection to the gateway <b>moon</b>
 which in turn activates <b>Dead Peer Detection</b> (DPD) with a polling interval of 10 s.
 When the network connectivity between <b>carol</b> and <b>moon</b> is forcefully disrupted,
-<b>moon</b> clears the connection after 4 unsuccessful retransmits.
+<b>moon</b> clears the connection after a number of unsuccessful retransmits.
 
index c1a2719031702173206b4655d37ff27268622eba..2071e8fc84d50e92c79b66ce855a9500048ed96f 100644 (file)
@@ -1,8 +1,8 @@
 carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
 carol::iptables -A INPUT -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
-moon:: sleep 180::no output expected::NO
+moon:: sleep 13::no output expected::NO
 moon:: cat /var/log/daemon.log::sending DPD request::YES
 moon:: cat /var/log/daemon.log::retransmit.*of request::YES
-moon:: cat /var/log/daemon.log::giving up after 5 retransmits::YES
+moon:: cat /var/log/daemon.log::giving up after.*retransmits::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED::NO
index 4c035a6e979f3fb80f9df714d89e94e29f0748ba..c7514fafea7264fa56fdec15fe0d1564a449e9b5 100644 (file)
@@ -2,13 +2,13 @@ carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
 moon:: iptables -A INPUT -i eth0 -s PH_IP_CAROL -j DROP::no output expected::NO
 carol::iptables -A INPUT -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
-carol::sleep 180::no output expected::NO
+carol::sleep 13::no output expected::NO
 carol::cat /var/log/daemon.log::sending DPD request::YES
 carol::cat /var/log/daemon.log::retransmit.*of request::YES
-carol::cat /var/log/daemon.log::giving up after 5 retransmits::YES
+carol::cat /var/log/daemon.log::giving up after.*retransmits::YES
 carol::iptables -D INPUT -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
 moon:: iptables -D INPUT -i eth0 -s PH_IP_CAROL -j DROP::no output expected::NO
 carol::ping -c 1 PH_IP_ALICE::trigger route::NO
-carol::sleep 2::no output expected::NO
+carol::sleep 1::no output expected::NO
 carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
index 962bd06367e9d34bba2076c2834bd15a5717c5b6..744307998552fc97918e2dfdf0f51255f5af0fab 100644 (file)
@@ -2,12 +2,12 @@ carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
 moon:: iptables -A INPUT -i eth0 -s PH_IP_CAROL -j DROP::no output expected::NO
 carol::iptables -A INPUT -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
-carol::sleep 180::no output expected::NO
+carol::sleep 13::no output expected::NO
 carol::cat /var/log/daemon.log::sending DPD request::YES
 carol::cat /var/log/daemon.log::retransmit.*of request::YES
-carol::cat /var/log/daemon.log::giving up after 5 retransmits::YES
+carol::cat /var/log/daemon.log::giving up after.*retransmits::YES
 carol::iptables -D INPUT -i eth0 -s PH_IP_MOON -j DROP::no output expected::NO
 moon:: iptables -D INPUT -i eth0 -s PH_IP_CAROL -j DROP::no output expected::NO
-carol::sleep 10::no output expected::NO
+carol::sleep 1::no output expected::NO
 carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
index e74ee1569533c3b97ae5bf114f51f8de29a8c6e4..3e441b2fec6a4ce6e8d7106a2b1c7f76c58affd3 100644 (file)
@@ -1,12 +1,12 @@
 The peers <b>carol</b> and <b>moon</b> both have dynamic IP addresses, so that the remote end
-is defined symbolically by <b>right=&lt;hostname&gt;</b>. The ipsec starter resolves the
+is defined symbolically by <b>right=&lt;hostname&gt;</b>. The IKE daemon resolves the
 fully-qualified hostname into the current IP address via a DNS lookup (simulated by an
 /etc/hosts entry). Since the peer IP addresses are expected to change over time, the option
-<b>rightallowany=yes</b> will allow an IKE_SA rekeying to arrive from an arbitrary
+<b>%</b> prefix in the <b>right</b> option will allow an IKE_SA rekeying to arrive from an arbitrary
 IP address under the condition that the peer identity remains unchanged. When this happens
 the old tunnel is replaced by an IPsec connection to the new origin.
 <p>
 In this scenario <b>carol</b> first initiates a tunnel to <b>moon</b>. After some time <b>carol</b>
 suddenly changes her IP address and restarts the connection to <b>moon</b> without deleting the
 old tunnel first (simulated by iptables blocking IKE packets to and from
-<b>carol</b> and starting the connection from host <b>dave</b> using <b>carol</b>'s identity). 
+<b>carol</b> and starting the connection from host <b>dave</b> using <b>carol</b>'s identity).
index 221c5931866545662747b534d8c948e819840e00..28c403b5535014f479b04c75401caa88e84ab0c5 100644 (file)
@@ -1,7 +1,7 @@
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED, TUNNEL::YES
 carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
 carol::ping -c 1 -s 120 -p deadbeef PH_IP_ALICE::128 bytes from PH_IP_ALICE: icmp_req=1::YES
-carol::sleep 15::NO
+carol::sleep 11::NO
 carol::cat /var/log/daemon.log::deleting CHILD_SA after 10 seconds of inactivity::YES
 moon:: ipsec status 2> /dev/null::rw.*INSTALLED::NO
 carol::ipsec status 2> /dev/null::home.*INSTALLED::NO
index 9ee5db95bf029a9c3fa5092abdede906c3668728..ad7de9ecccbb4381cc7fa52c64d6979b0d650971 100644 (file)
@@ -6,5 +6,5 @@ OCSP server is listening. Thanks to timeouts the connection can nevertheless
 be established successfully by contacting a valid OCSP URI contained in
 <b>carol</b>'s certificate.
 <p>
-As an additional test the OCSP response is delayed by 5 seconds in order to check
+As an additional test the OCSP response is delayed by a few seconds in order to check
 the correct handling of retransmitted IKE_AUTH messages.
index aa70321d5b4ae0d623226645c1b72eafa7684c37..46a716f838ed7de26c87b04f7e8fc5dfca0d1a5e 100755 (executable)
@@ -6,7 +6,7 @@ echo "Content-type: application/ocsp-response"
 echo ""
 
 # simulate a delayed response
-sleep 5
+sleep 2
 
 cat | /usr/bin/openssl ocsp -index index.txt -CA strongswanCert.pem \
        -rkey ocspKey.pem -rsigner ocspCert.pem \
index 2b80853c64ed4d602b36376ed4731b7feadfd329..094e0effa49787b341ff807dab8b35052c18de35 100644 (file)
@@ -2,8 +2,4 @@
 
 charon {
   load = test-vectors aes des sha1 sha2 md5 pem pkcs1 pkcs8 gmp random nonce x509 curl revocation hmac xcbc cmac ctr ccm gcm stroke kernel-netlink socket-default updown
-
-  retransmit_timeout = 2
-  retransmit_base = 1.5
-  retransmit_tries = 3 
 }
index 7f06388b8ec79def7c1ee5d7b2eb9a4fcbe0c44e..d117a30013ff9349ad2a7f5fdba859ab6631f4e5 100644 (file)
@@ -3,9 +3,6 @@
 charon {
   load = test-vectors pem pkcs1 pkcs8 random nonce x509 revocation openssl soup stroke kernel-netlink socket-default
 
-  retransmit_timeout = 2
-  retransmit_base = 1.5
-  retransmit_tries = 3
   initiator_only = yes
   integrity_test = yes
 
index 7f06388b8ec79def7c1ee5d7b2eb9a4fcbe0c44e..d117a30013ff9349ad2a7f5fdba859ab6631f4e5 100644 (file)
@@ -3,9 +3,6 @@
 charon {
   load = test-vectors pem pkcs1 pkcs8 random nonce x509 revocation openssl soup stroke kernel-netlink socket-default
 
-  retransmit_timeout = 2
-  retransmit_base = 1.5
-  retransmit_tries = 3
   initiator_only = yes
   integrity_test = yes
 
index b8488fef88b8b1872950f11edd37878355140e83..e8706082e971bc9b0850d51d6fea26f35338fcf9 100644 (file)
@@ -5,6 +5,8 @@ charon {
 
   multiple_authentication=no
 
+  retransmit_tries = 5
+
   plugins {
     eap-tnc {
       protocol = tnccs-1.1
index 2284412898f8a3ee775ce6b8f3e2917eec4491f1..156a2e4c42cadccba7746166085a59273f355259 100644 (file)
@@ -5,6 +5,8 @@ charon {
 
   multiple_authentication = no
 
+  retransmit_tries = 5
+
   plugins {
     tnc-imc {
       preferred_language = de
index ee16a4cad2f5abc56f9457836cc10f3d9aa4efa2..8aa2ab97e44867a915c3338f05190352036a34ee 100644 (file)
@@ -3,6 +3,8 @@
 charon {
   load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 curl revocation hmac stroke kernel-netlink socket-default eap-identity eap-md5 eap-ttls eap-tnc tnc-imc tnc-tnccs tnccs-20 updown
 
+  retransmit_timeout =
+
   plugins {
     eap-ttls {
       max_message_count = 0
index dd7d1607685ff0672016e0beba0bf21c86ea08d8..aea7a71f93e022cb94102418fdca0a95bad166b7 100644 (file)
@@ -3,7 +3,9 @@
 charon {
   load = aes des sha1 sha2 md5 pem pkcs1 gmp random nonce x509 curl revocation hmac stroke kernel-netlink socket-default eap-identity eap-md5 eap-ttls eap-tnc tnc-imc tnc-tnccs tnccs-20 updown
 
-  plugins {    
+  retransmit_timeout =
+
+  plugins {
    eap-ttls {
       max_message_count = 0
     }
index e67223b4509fd9d6696259b11e0d1d7dd7b35611..c69f9454db828d36304eae796da1e766473f83d8 100644 (file)
@@ -3,6 +3,8 @@
 charon {
   load = aes md5 sha1 sha2 hmac gmp pem pkcs1 random nonce x509 curl revocation stroke kernel-netlink socket-default eap-identity eap-md5 eap-ttls eap-tnc tnc-imc tnc-tnccs tnccs-20 updown
 
+  retransmit_timeout =
+
   multiple_authentication = no
 
   plugins {
index 3c41f154ab41e18cdea572c8d4e2a5d4689ab38b..b6c9ab66170523c48791b249e64b98333a2b206c 100644 (file)
@@ -3,6 +3,8 @@
 charon {
   load = openssl curl pem pkcs1 random nonce revocation stroke kernel-netlink socket-default eap-identity eap-md5 eap-ttls eap-tnc tnc-imc tnc-tnccs tnccs-20 updown
 
+  retransmit_timeout =
+
   multiple_authentication = no
   plugins {
     tnc-imc {
index 88a4ad36e1620ff438e1dd8a8bda352e11e95692..68e4a4689cfac8d1fe3b53f29d6b4139abfba173 100644 (file)
@@ -3,6 +3,8 @@
 charon {
   load = openssl curl pem pkcs1 random nonce revocation stroke kernel-netlink socket-default eap-identity eap-ttls eap-md5 eap-tnc tnc-imv tnc-tnccs tnccs-20 updown sqlite
 
+  retransmit_timeout =
+
   multiple_authentication = no
 
   plugins {