/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec whack --impair suppress_retransmits
west #
 ipsec whack --impair block_inbound:yes
IMPAIR: recording all inbound messages
IMPAIR: block all inbound messages: no -> yes
west #
 ipsec auto --add east-west
"east-west": added oriented IKEv2 connection
west #
 ../../guestbin/wait-for-inbound.sh 1
IMPAIR: packet from 192.1.2.23:500: blocking inbound message 1
west #
 ipsec up --asynchronous east-west
"east-west" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
west #
 ../../guestbin/wait-for-pluto.sh '^".*#1: sent IKE_SA_INIT request'
"east-west" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
west #
 ../../guestbin/wait-for-inbound.sh 2
IMPAIR: packet from 192.1.2.23:500: blocking inbound message 2
west #
 ipsec whack --impair drip_inbound:1
IMPAIR: start processing inbound drip packet 1
IMPAIR: stop processing inbound drip packet 1
west #
 ../../guestbin/wait-for-pluto.sh '^".*#2: sent IKE_SA_INIT'
"east-west" #2: sent IKE_SA_INIT response to 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 ke=DH19}, expecting IKE_AUTH, IKE_INTERMEDIATE, or IKE_AUTH (EAP)
west #
 ../../guestbin/wait-for-inbound.sh 3
IMPAIR: packet from 192.1.2.23:500: blocking inbound message 3
west #
 ipsec whack --impair drip_inbound:2
IMPAIR: start processing inbound drip packet 2
IMPAIR: stop processing inbound drip packet 2
west #
 ../../guestbin/wait-for.sh --match '^".*#1: sent IKE_AUTH request'  -- cat /tmp/pluto.log
"east-west" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500 with shared-key-mac and FQDN '@west'; Child SA #3 {ESP <0xESPESP} [192.0.1.0/24===192.0.2.0/24]
west #
 ../../guestbin/wait-for-inbound.sh 4
IMPAIR: packet from 192.1.2.23:500: blocking inbound message 4
west #
 ipsec whack --impair drip_inbound:4
IMPAIR: start processing inbound drip packet 4
IMPAIR: stop processing inbound drip packet 4
west #
 ../../guestbin/wait-for-pluto.sh 'established Child SA using #1'
"east-west" #3: initiator established Child SA using #1; IPsec tunnel [192.0.1.0/24===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256 DPD=passive}
west #
 ipsec whack --impair drip_inbound:3
IMPAIR: start processing inbound drip packet 3
IMPAIR: stop processing inbound drip packet 3
west #
 ../../guestbin/wait-for.sh --match 'established Child SA using #2'  -- cat /tmp/pluto.log
"east-west" #4: responder established Child SA using #2; IPsec tunnel [192.0.1.0/24===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256 DPD=passive}
west #
 ipsec whack --impair block_inbound:no
IMPAIR: block all inbound messages: yes -> no
west #
