/testing/guestbin/swan-prep
west #
 # confirm that the network is alive
west #
 ../../guestbin/wait-until-alive -I 192.0.1.254 192.0.2.254
destination -I 192.0.1.254 192.0.2.254 is alive
west #
 # ensure that clear text does not get through
west #
 iptables -A INPUT -i eth1 -s 192.0.2.0/24 -j DROP
west #
 iptables -I INPUT -m policy --dir in --pol ipsec -j ACCEPT
west #
 # confirm clear text does not get through
west #
 ../../guestbin/ping-once.sh --down -I 192.0.1.254 192.0.2.254
down
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec add west-east
"west-east": added IKEv2 connection
west #
 ipsec whack --impair suppress_retransmits
west #
 ipsec whack --impair revival
west #
 ipsec route west-east
west #
 ipsec whack --impair install_ipsec_sa_inbound_policy
west #
 # Initiate; during IKE_AUTH the child should fail and the connection
west #
 # put on to the revival queue
west #
 ipsec up west-east
"west-east" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"west-east" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"west-east" #1: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"west-east" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500; Child SA #2 {ESP <0xESPESP}
"west-east" #1: initiator established IKE SA; authenticated peer using authby=secret and FQDN '@east'
"west-east" #2: IMPAIR: kernel: install_ipsec_sa_inbound_policy in install_inbound_ipsec_kernel_policies()
"west-east" #2: CHILD SA failed: TEMPORARY_FAILURE
"west-east" #1: IKE SA established but initiator rejected Child SA response
"west-east" #2: sent INFORMATIONAL request to delete larval Child SA using IKE SA #1
"west-east" #2: connection is supposed to remain up; revival attempt 1 scheduled in 0 seconds
"west-east" #2: IMPAIR: revival: skip scheduling revival event
ERROR: "west-east" #2: netlink response for Del SA esp.ESPSPIi@192.1.2.23: No such process (errno 3)
west #
 # expect the on-demand kernel policy
west #
 ipsec _kernel policy
src 192.0.1.0/24 dst 192.0.2.0/24
	dir out priority PRIORITY ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid 0 mode transport
west #
 # Trigger an acquire; this fast track the revival using
west #
 # CREATE_CHILD_SA and again it will fail
west #
 ../../guestbin/ping-once.sh --down -I 192.0.1.254 192.0.2.254
down
west #
 ../../guestbin/wait-for-pluto.sh '#3: IMPAIR: revival'
"west-east" #3: IMPAIR: revival: skip scheduling revival event
west #
 ipsec _kernel state
src 192.0.1.254 dst 192.0.2.254
	proto esp spi 0x00000000 reqid 0 mode transport
	replay-window 0 
	sel src 192.0.1.254/32 dst 192.0.2.254/32 proto icmp type 8 code 0 dev eth1 
west #
 ipsec _kernel policy
src 192.0.1.0/24 dst 192.0.2.0/24
	dir out priority PRIORITY ptype main
	tmpl src 0.0.0.0 dst 0.0.0.0
		proto esp reqid 0 mode transport
west #
 ipsec unroute west-east
west #
