/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec auto --add westnet-eastnet
002 "westnet-eastnet": added IKEv1 connection
west #
 echo "initdone"
initdone
west #
 # wait for east to initiate to us
west #
 sleep 10
west #
 ../../guestbin/ping-once.sh --up -I 192.0.1.254 192.0.2.254
up
west #
 # should show non-zero traffic counters
west #
 ipsec whack --trafficstatus
006 #2: "westnet-eastnet", type=ESP, add_time=1234567890, inBytes=84, outBytes=84, maxBytes=2^63B, id='@east'
west #
 # sending delete/notify should cause east to re-initiate
west #
 ipsec auto --down westnet-eastnet
002 "westnet-eastnet": terminating SAs using this connection
002 "westnet-eastnet" #2: deleting state (STATE_QUICK_R2) and sending notification
005 "westnet-eastnet" #2: ESP traffic information: in=84B out=84B
002 "westnet-eastnet" #1: deleting state (STATE_MAIN_R3) and sending notification
west #
 # give Delete/Notify some time
west #
 sleep 5
west #
 # A new IPsec SA should be established (older versions would take 30 seconds)
west #
 # traffic counters should be zero
west #
 ipsec whack --trafficstatus
006 #4: "westnet-eastnet", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='@east'
west #
 
