/testing/guestbin/swan-prep
east #
 ipsec start
Redirecting to: [initsystem]
east #
 ../../guestbin/wait-until-pluto-started
east #
 # connections are loaded and initiated via auto=start
east #
 # waiting until we are within the last 50s of the IPsec SA lifetime
east #
 while (ipsec status |grep STATE_QUICK_I2 |grep "EVENT_SA_REPLACE in 5"); ret=$?; [ $ret -ne 0 ]; do sleep 1; done
000 #2: "west-east-auto":500 STATE_QUICK_I2 (sent QI2, IPsec SA established); REPLACE in XXs; newest; eroute owner; ISAKMP SA #1; idle;
east #
 ipsec status |grep STATE_QUICK_I2 |grep "EVENT_SA_REPLACE in"
000 #2: "west-east-auto":500 STATE_QUICK_I2 (sent QI2, IPsec SA established); REPLACE in XXs; newest; eroute owner; ISAKMP SA #1; idle;
east #
 # Connection should be up, and there should be NO log message about "already replacing"
east #
 ipsec trafficstatus
006 #2: "west-east-auto", type=ESP, add_time=1234567890, inBytes=0, outBytes=0, maxBytes=2^63B, id='@west'
006 #4: "west-east-auto", type=ESP, add_time=1234567890, inBytes=336, outBytes=336, maxBytes=2^63B, id='@west'
east #
 grep "already replacing" /tmp/pluto.log && echo "bug triggered"
"west-east-auto" #1: received Delete SA payload: already replacing IPsec State #2 in 54 seconds
bug triggered

