/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 /testing/pluto/bin/wait-until-pluto-started
west #
 ipsec auto --add westnet-eastnet-ipv4-psk-ikev2
002 added IKEv2 connection "westnet-eastnet-ipv4-psk-ikev2"
west #
 echo "initdone"
initdone
west #
 # send KE:0 -- which is invalid
west #
 ipsec whack --impair none
west #
 ipsec whack --impair revival
west #
 ipsec whack --impair ke-payload:0
west #
 ipsec whack --impair suppress-retransmits
west #
 # should fail with syntax-error response
west #
 ipsec auto --up westnet-eastnet-ipv4-psk-ikev2
1v2 "westnet-eastnet-ipv4-psk-ikev2" #1: initiating IKEv2 connection
002 "westnet-eastnet-ipv4-psk-ikev2" #1: IMPAIR: sending bogus KE (g^x) == 0 value to break DH calculations
1v2 "westnet-eastnet-ipv4-psk-ikev2" #1: sent IKE_SA_INIT request
207 "westnet-eastnet-ipv4-psk-ikev2" #1: state transition 'Initiator: process IKE_SA_INIT reply, initiate IKE_AUTH or IKE_INTERMEDIATE' failed with v2N_INVALID_SYNTAX
002 "westnet-eastnet-ipv4-psk-ikev2" #1: deleting state (STATE_PARENT_I1) and NOT sending notification
002 "westnet-eastnet-ipv4-psk-ikev2" #1: IMPAIR: skipping revival of connection that is supposed to remain up
west #
 # receive KE:0 -- which is invalid
west #
 ipsec whack --impair none
west #
 ipsec whack --impair revival
west #
 ipsec whack --impair suppress-retransmits
west #
 # should fail fail with syntax error
west #
 ipsec auto --up westnet-eastnet-ipv4-psk-ikev2
1v2 "westnet-eastnet-ipv4-psk-ikev2" #2: initiating IKEv2 connection
1v2 "westnet-eastnet-ipv4-psk-ikev2" #2: sent IKE_SA_INIT request
207 "westnet-eastnet-ipv4-psk-ikev2" #2: state transition 'Initiator: process IKE_SA_INIT reply, initiate IKE_AUTH or IKE_INTERMEDIATE' failed with v2N_INVALID_SYNTAX
002 "westnet-eastnet-ipv4-psk-ikev2" #2: deleting state (STATE_PARENT_I1) and NOT sending notification
002 "westnet-eastnet-ipv4-psk-ikev2" #2: IMPAIR: skipping revival of connection that is supposed to remain up
west #
 echo done
done
west #
 grep -e v2N_INVALID_KE_PAYLOAD -e v2N_INVALID_SYNTAX /tmp/pluto.log | grep -v -e '^|'
"westnet-eastnet-ipv4-psk-ikev2" #1: state transition 'Initiator: process IKE_SA_INIT reply, initiate IKE_AUTH or IKE_INTERMEDIATE' failed with v2N_INVALID_SYNTAX
"westnet-eastnet-ipv4-psk-ikev2" #2: state transition 'Initiator: process IKE_SA_INIT reply, initiate IKE_AUTH or IKE_INTERMEDIATE' failed with v2N_INVALID_SYNTAX
west #
 ../bin/check-for-core.sh
west #
 if [ -f /sbin/ausearch ]; then ausearch -r -m avc -ts recent ; fi
west #
 
