/testing/guestbin/swan-prep
east #
 echo "192.1.3.0/24"  > /etc/ipsec.d/policies/private
east #
 # ensure for tests acquires expire before our failureshunt=2m
east #
 echo 30 > /proc/sys/net/core/xfrm_acq_expires
east #
 ip -s xfrm monitor > /tmp/xfrm-monitor.out & sleep 1
[x] PID
east #
 echo "initdone"
initdone
east #
 ipsec start
Redirecting to: [initsystem]
east #
 ../../guestbin/wait-until-pluto-started
east #
 # give OE policies time to load
east #
 ../../guestbin/wait-for.sh --match 'loaded 2,' -- ipsec auto --status
Total IPsec connections: loaded 2, active 0
east #
 # initiate a reverse connection
east #
 ../../guestbin/ping-once.sh --forget -I 192.1.2.23 192.1.3.209
fired and forgotten
east #
 ../../guestbin/wait-for.sh --match private -- ipsec trafficstatus
#2: "private#192.1.3.0/24"[1] ...192.1.3.209, type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='@id'
east #
 # check the policy
east #
 ../../guestbin/ipsec-kernel-policy.sh
src 192.1.2.23/32 dst 192.1.3.209/32
	dir out priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.3.209
		proto esp reqid REQID mode tunnel
src 192.1.3.209/32 dst 192.1.2.23/32
	dir fwd priority PRIORITY ptype main
	tmpl src 192.1.3.209 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.1.3.209/32 dst 192.1.2.23/32
	dir in priority PRIORITY ptype main
	tmpl src 192.1.3.209 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
src 192.1.2.23/32 dst 192.1.3.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
east #
 
