/testing/guestbin/swan-prep
west #
 ipsec start
Redirecting to: [initsystem]
west #
 ../../guestbin/wait-until-pluto-started
west #
 ipsec add addconn
"addconn": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec add addconn--nic-offload=no
"addconn--nic-offload=no": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec add addconn--nic-offload=yes
"addconn--nic-offload=yes": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec add addconn--nic-offload=packet
"addconn--nic-offload=packet": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec add addconn--nic-offload=crypto
"addconn--nic-offload=crypto": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 # should fail to load
west #
 ipsec add addconn-encapsulation=yes
"addconn-encapsulation=yes": failed to add connection: nic-offload=packet cannot specify encapsulation=yes
west #
 ipsec whack --name whack                                           --transport --host 1.2.3.4 --to --host 5.6.7.8
"whack": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--nic-offload-x      --nic-offload x       --transport --host 1.2.3.4 --to --host 5.6.7.8
ipsec whack: option --nic-offload 'x' invalid: 'x' is not recognised, valid arguments are: no, crypto, packet
west #
 ipsec whack --name whack--nic-offload=no     --nic-offload=no      --transport --host 1.2.3.4 --to --host 5.6.7.8
"whack--nic-offload=no": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--nic-offload=yes    --nic-offload=yes     --transport --host 1.2.3.4 --to --host 5.6.7.8
"whack--nic-offload=yes": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--nic-offload=packet --nic-offload=packet  --transport --host 1.2.3.4 --to --host 5.6.7.8
"whack--nic-offload=packet": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--nic-offload=crypto --nic-offload=crypto  --transport --host 1.2.3.4 --to --host 5.6.7.8
"whack--nic-offload=crypto": added unoriented IKEv2 connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--passthrough                                            --pass --host 1.2.3.4 --to --host 5.6.7.8
"whack--passthrough": added unoriented passthrough connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--passthrough--nic-offload=no      --nic-offload=no      --pass --host 1.2.3.4 --to --host 5.6.7.8
"whack--passthrough--nic-offload=no": nic-offload=no ignored for never-negotiate connection
"whack--passthrough--nic-offload=no": added unoriented passthrough connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--passthrough--nic-offload=yes     --nic-offload=yes     --pass --host 1.2.3.4 --to --host 5.6.7.8
"whack--passthrough--nic-offload=yes": nic-offload=crypto ignored for never-negotiate connection
"whack--passthrough--nic-offload=yes": added unoriented passthrough connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--passthrough--nic-offload=packet  --nic-offload=packet  --pass --host 1.2.3.4 --to --host 5.6.7.8
"whack--passthrough--nic-offload=packet": nic-offload=packet ignored for never-negotiate connection
"whack--passthrough--nic-offload=packet": added unoriented passthrough connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec whack --name whack--passthrough--nic-offload=crypto  --nic-offload=crypto  --pass --host 1.2.3.4 --to --host 5.6.7.8
"whack--passthrough--nic-offload=crypto": nic-offload=crypto ignored for never-negotiate connection
"whack--passthrough--nic-offload=crypto": added unoriented passthrough connection (neither left=1.2.3.4 nor right=5.6.7.8 match an interface)
west #
 ipsec connectionstatus | sed -n -e 's/\(^[^:]*:\).* \(nic-offload:[^;]*\);.*/\1 \2/p' | sort
"addconn--nic-offload=crypto": nic-offload:crypto
"addconn": nic-offload:no
"addconn--nic-offload=no": nic-offload:no
"addconn--nic-offload=packet": nic-offload:packet
"addconn--nic-offload=yes": nic-offload:crypto
"whack--nic-offload=crypto": nic-offload:crypto
"whack": nic-offload:no
"whack--nic-offload=no": nic-offload:no
"whack--nic-offload=packet": nic-offload:packet
"whack--nic-offload=yes": nic-offload:crypto
"whack--passthrough--nic-offload=crypto": nic-offload:no
"whack--passthrough": nic-offload:no
"whack--passthrough--nic-offload=no": nic-offload:no
"whack--passthrough--nic-offload=packet": nic-offload:no
"whack--passthrough--nic-offload=yes": nic-offload:no
west #
 
