/testing/guestbin/swan-prep --nokeys
Creating empty NSS database
west #
 cp test.conf /tmp/test.conf
west #
 ipsec pluto --config /tmp/test.conf
west #
 ../../guestbin/wait-until-pluto-started
west #
 echo "initdone"
initdone
west #
 # did pluto forked addconn pickup right config file location and load the connection
west #
 ipsec status | grep westnet-eastnet-ipv4-psk-ikev2 | grep "[.][.][.]"
"westnet-eastnet-ipv4-psk-ikev2": 192.0.1.0/24===192.1.2.45[@west]...192.1.2.23[@east]===192.0.2.0/24; unrouted; my_ip=unset; their_ip=unset;
west #
 # does status show /tmp/test.conf as config file used for startup
west #
 ipsec status | grep configfile
configdir=/etc, configfile=/tmp/test.conf, secrets=/etc/ipsec.secrets, ipsecdir=/etc/ipsec.d
west #
 # rhbz#1645137 test
west #
 ipsec addconn --config /tmp/test.conf longike
"longike": added IKEv2 connection
west #
 ipsec whack --shutdown # stop will cause reading /etc/ipsec.conf
Pluto is shutting down
west #
 # rhbz#1625303 test
west #
 cp bomb.conf /etc/ipsec.conf
west #
 cp include-bomb.conf /etc/ipsec.d/
west #
 restorecon /etc/ipsec.conf /etc/ipsec.d/include-bomb.conf
west #
 # should fail properly at maxdepth recursion
west #
 ipsec addconn --verbose --config /etc/ipsec.conf --checkconfig
opening file: /etc/ipsec.conf
ipsec addconn: /etc/ipsec.d/include-bomb.conf:3: warning: including '/etc/ipsec.d/include-bomb.conf' exceeds max inclusion depth of 10
west #
 echo done
done
west #
 
