Debian Codegraph @

testing/pluto/impair-install-ipsec-sa-outbound-policy-initiator-ikev2/west.console.txt

raw
1 /testing/guestbin/swan-prep
2 west #
3 # confirm that the network is alive
4 west #
5 ../../guestbin/wait-until-alive -I 192.0.1.254 192.0.2.254
6 destination -I 192.0.1.254 192.0.2.254 is alive
7 west #
8 # ensure that clear text does not get through
9 west #
10 iptables -A INPUT -i eth1 -s 192.0.2.0/24 -j DROP
11 west #
12 iptables -I INPUT -m policy --dir in --pol ipsec -j ACCEPT
13 west #
14 # confirm clear text does not get through
15 west #
16 ../../guestbin/ping-once.sh --down -I 192.0.1.254 192.0.2.254
17 down
18 west #
19 ipsec start
20 Redirecting to: [initsystem]
21 west #
22 ../../guestbin/wait-until-pluto-started
23 west #
24 ipsec add west-east
25 "west-east": added IKEv2 connection
26 west #
27 ipsec whack --impair suppress_retransmits
28 west #
29 ipsec whack --impair revival
30 west #
31 ipsec route west-east
32 west #
33 ipsec whack --impair install_ipsec_sa_outbound_policy
34 west #
35 # Initiate; during IKE_AUTH the child should fail and the connection
36 west #
37 # put on to the revival queue
38 west #
39 ipsec up west-east
40 "west-east" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
41 "west-east" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
42 "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
43 "west-east" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
44 "west-east" #1: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
45 "west-east" #2: IMPAIR: kernel: install_ipsec_sa_outbound_policy in install_outbound_ipsec_kernel_policies()
46 "west-east" #2: CHILD SA failed: TEMPORARY_FAILURE
47 "west-east" #1: IKE SA established but initiator rejected Child SA response
48 "west-east" #2: sent INFORMATIONAL request to delete larval Child SA using IKE SA #1
49 "west-east" #2: connection is supposed to remain up; revival attempt 1 scheduled in 0 seconds
50 "west-east" #2: IMPAIR: revival: skip scheduling revival event
51 west #
52 # expect the on-demand kernel policy
53 west #
54 ../../guestbin/ipsec-kernel-policy.sh
55 src 192.0.1.0/24 dst 192.0.2.0/24
56 dir out priority PRIORITY ptype main
57 tmpl src 0.0.0.0 dst 0.0.0.0
58 proto esp reqid 0 mode transport
59 west #
60 # Trigger an acquire; this fast track the revival using
61 west #
62 # CREATE_CHILD_SA and again it will fail
63 west #
64 ../../guestbin/ping-once.sh --down -I 192.0.1.254 192.0.2.254
65 down
66 west #
67 ../../guestbin/wait-for-pluto.sh '#3: IMPAIR: revival'
68 "west-east" #3: IMPAIR: revival: skip scheduling revival event
69 west #
70 ../../guestbin/ipsec-kernel-state.sh
71 src 192.0.1.254 dst 192.0.2.254
72 proto esp spi 0x00000000 reqid 0 mode transport
73 replay-window 0
74 sel src 192.0.1.254/32 dst 192.0.2.254/32 proto icmp type 8 code 0 dev eth1
75 west #
76 ../../guestbin/ipsec-kernel-policy.sh
77 src 192.0.1.0/24 dst 192.0.2.0/24
78 dir out priority PRIORITY ptype main
79 tmpl src 0.0.0.0 dst 0.0.0.0
80 proto esp reqid 0 mode transport
81 west #
82 ipsec unroute west-east
83 west #
84