/testing/guestbin/swan-prep --hostkeys
Creating NSS database containing host keys
north #
 ipsec start
Redirecting to: [initsystem]
north #
 ../../guestbin/wait-until-pluto-started
north #
 ipsec auto --add initiator
"initiator": added IKEv2 connection
north #
 echo "initdone"
initdone
north #
 # check policy installed / uninstalled
north #
 ipsec route initiator
north #
 ipsec _kernel policy
src 192.0.3.254/32 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
north #
 ipsec unroute initiator
north #
 ipsec _kernel policy
north #
 # put trap back
north #
 ipsec route initiator
north #
 ipsec _kernel policy
src 192.0.3.254/32 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
north #
 # one ping to trigger IKE
north #
 ../../guestbin/ping-once.sh --forget -I 192.0.3.254 192.0.2.254
fired and forgotten
north #
 ../../guestbin/wait-for.sh --match initiator -- ipsec whack --trafficstatus
#2: "initiator", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='@east'
north #
 ../../guestbin/ping-once.sh --up -I 192.0.3.254 192.0.2.254
up
north #
 ipsec whack --trafficstatus
#2: "initiator", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
north #
 # wait for larval state to clear; hack
north #
 ../../guestbin/wait-for.sh --no-match 0x00000000 ipsec _kernel state
north #
 # real policy installed
north #
 ipsec _kernel policy
src 192.0.2.0/24 dst 192.0.3.254/32
	dir fwd priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.3.33
		proto esp reqid REQID mode tunnel
src 192.0.2.0/24 dst 192.0.3.254/32
	dir in priority PRIORITY ptype main
	tmpl src 192.1.2.23 dst 192.1.3.33
		proto esp reqid REQID mode tunnel
src 192.0.3.254/32 dst 192.0.2.0/24
	dir out priority PRIORITY ptype main
	tmpl src 192.1.3.33 dst 192.1.2.23
		proto esp reqid REQID mode tunnel
north #
 ipsec _kernel state
src 192.1.3.33 dst 192.1.2.23
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 0, bitmap-length 0
src 192.1.2.23 dst 192.1.3.33
	proto esp spi 0xSPISPI reqid REQID mode tunnel
	replay-window 0 flag af-unspec esn
	aead rfc4106(gcm(aes)) 0xENCAUTHKEY 128
	lastused YYYY-MM-DD HH:MM:SS
	anti-replay esn context:
	 seq-hi 0x0, seq 0xXX, oseq-hi 0x0, oseq 0xXX
	 replay_window 128, bitmap-length 4
	 00000000 00000000 00000000 XXXXXXXX 
north #
 # down before unroute; everything but trap cleared
north #
 ipsec auto --down initiator
"initiator": initiating delete of connection's IKE SA #1 (and Child SA #2)
"initiator" #1: sent INFORMATIONAL request to delete IKE SA
"initiator" #2: ESP traffic information: in=84B out=84B
"initiator" #1: deleting IKE SA (established IKE SA)
north #
 ipsec _kernel policy
src 192.0.3.254/32 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
north #
 ipsec _kernel state
north #
 # now clear everything
north #
 ipsec unroute initiator
north #
 ipsec _kernel policy
north #
