/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 #ipsec auto --add west-east-auto
west #
 echo "initdone"
initdone
west #
 # wait for east to initiate to us
west #
 sleep 10
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23
up
west #
 ipsec whack --trafficstatus
006 #2: "west-east-auto", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, id='@east'
west #
 # sending delete/notify should cause east to re-initiate
west #
 ipsec auto --down west-east-auto
002 "west-east-auto": terminating SAs using this connection
005 "west-east-auto" #2: ESP traffic information: in=84B out=84B
002 "west-east-auto" #1: deleting state (STATE_V2_ESTABLISHED_IKE_SA) and sending notification
west #
 sleep 5
west #
 # A new IPsec SA should be established (without patch takes 30 seconds)
west #
 ipsec whack --trafficstatus
006 #4: "west-east-auto", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, id='@east'
west #
 # traffic flow should still work
west #
 ../../guestbin/ping-once.sh --up 192.1.2.23
up
west #
 sleep 20
west #
 ipsec whack --trafficstatus
006 #4: "west-east-auto", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, id='@east'
west #
 
