/testing/guestbin/swan-prep --46
west #
 echo "initdone"
initdone
west #
 #
west #
 # valid device
west #
 #
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ip link add dev ipsec1 type xfrm dev eth1 if_id 0x1
west #
 ip addr add 192.0.1.251/24 dev ipsec1
west #
 ip addr add 2001:db8:0:1::251/64 dev ipsec1
west #
 ipsec add westnet4-eastnet4
"westnet4-eastnet4": added IKEv2 connection
west #
 ipsec add westnet6-eastnet6
"westnet6-eastnet6": added IKEv2 connection
west #
 ipsec up westnet4-eastnet4
"westnet4-eastnet4" #1: initiating IKEv2 connection to 192.1.2.23 using UDP
"westnet4-eastnet4" #1: sent IKE_SA_INIT request to 192.1.2.23:UDP/500
"westnet4-eastnet4" #1: processed IKE_SA_INIT response from 192.1.2.23:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"westnet4-eastnet4" #1: sent IKE_AUTH request to 192.1.2.23:UDP/500
"westnet4-eastnet4" #1: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
"westnet4-eastnet4" #2: initiator established Child SA using #1; IPsec tunnel [192.0.1.0/24===192.0.2.0/24] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ipsec up westnet6-eastnet6
"westnet6-eastnet6" #3: initiating IKEv2 connection to 2001:db8:1:2::23 using UDP
"westnet6-eastnet6" #3: sent IKE_SA_INIT request to [2001:db8:1:2::23]:UDP/500
"westnet6-eastnet6" #3: processed IKE_SA_INIT response from [2001:db8:1:2::23]:UDP/500 {cipher=AES_GCM_16_256 integ=n/a prf=HMAC_SHA2_512 group=DH19}, initiating IKE_AUTH
"westnet6-eastnet6" #3: sent IKE_AUTH request to [2001:db8:1:2::23]:UDP/500
"westnet6-eastnet6" #3: initiator established IKE SA; authenticated peer using authby=secret and ID_FQDN '@east'
"westnet6-eastnet6" #4: initiator established Child SA using #3; IPsec tunnel [2001:db8:0:1::/64===2001:db8:0:2::/64] {ESP/ESN=>0xESPESP <0xESPESP xfrm=AES_GCM_16_256-NONE DPD=passive}
west #
 ipsec delete westnet4-eastnet4
"westnet4-eastnet4": terminating SAs using this connection
"westnet4-eastnet4" #1: deleting IKE SA (ESTABLISHED_IKE_SA) and sending notification
"westnet4-eastnet4" #2: cannot delete ipsec-interface ipsec1@eth1 IP [192.0.1.251/24], not created by pluto
"westnet4-eastnet4" #2: ESP traffic information: in=0B out=0B
west #
 ipsec delete westnet6-eastnet6
"westnet6-eastnet6": terminating SAs using this connection
"westnet6-eastnet6" #3: deleting IKE SA (ESTABLISHED_IKE_SA) and sending notification
"westnet6-eastnet6" #4: cannot delete ipsec-interface ipsec1@eth1 IP [2001:db8:0:1::251/64], not created by pluto
"westnet6-eastnet6" #4: ESP traffic information: in=0B out=0B
west #
 ip --color=never link show ipsec1
X: ipsec1@eth1: <NOARP,UP,LOWER_UP> mtu 1500 state UNKNOWN
west #
 ip link del dev ipsec1
west #
 ipsec stop
Redirecting to: [initsystem]
west #
 #
west #
 # invalid device (no dev eth1)
west #
 #
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ip link add dev ipsec1 type xfrm if_id 0x1
west #
 ip addr add 192.0.1.251/24 dev ipsec1
west #
 ip addr add 2001:db8:0:1::251/64 dev ipsec1
west #
 ipsec add westnet4-eastnet4
ERROR: "westnet4-eastnet4": existing ipsec-interface ipsec1 is not valid: IFLA_XFRM_LINK attribute is zero, check 'ip -d link show dev ipsec1'
"westnet4-eastnet4": added unoriented IKEv2 connection (neither left=192.1.2.45 nor right=192.1.2.23 match an interface)
west #
 ipsec add westnet6-eastnet6
ERROR: "westnet6-eastnet6": existing ipsec-interface ipsec1 is not valid: IFLA_XFRM_LINK attribute is zero, check 'ip -d link show dev ipsec1'
"westnet6-eastnet6": added unoriented IKEv2 connection (neither left=2001:db8:1:2::45 nor right=2001:db8:1:2::23 match an interface)
west #
 ipsec up westnet4-eastnet4
"westnet4-eastnet4": we cannot identify ourselves with either end of this connection.  192.1.2.45 or 192.1.2.23 are not usable
west #
 ipsec up westnet6-eastnet6
"westnet6-eastnet6": we cannot identify ourselves with either end of this connection.  2001:db8:1:2::45 or 2001:db8:1:2::23 are not usable
west #
 ipsec delete westnet4-eastnet4
west #
 ipsec delete westnet6-eastnet6
west #
 ip --color=never link show ipsec1
X: ipsec1@NONE: <NOARP> mtu 1500 qdisc state DOWN qlen 1000
west #
 ip link del dev ipsec1
west #
 ipsec stop
Redirecting to: [initsystem]
west #
 
