/testing/guestbin/swan-prep --46
west #
 echo "initdone"
initdone
west #
 systemctl start ipsec.service || echo failed
west #
 systemctl status ipsec.service >/dev/null || echo failed
west #
 systemctl start ipsec.service && echo detected proper failure
detected proper failure
west #
 systemctl status ipsec.service >/dev/null || echo failed
west #
 systemctl restart ipsec.service || echo failed
west #
 systemctl status ipsec.service >/dev/null || echo failed
west #
 systemctl stop ipsec.service || echo failed
west #
 systemctl status ipsec.service >/dev/null && echo detected proper failure
west #
 systemctl stop ipsec.service || echo failed
west #
 systemctl status ipsec.service >/dev/null && echo detected proper failure
west #
 systemctl start ipsec.service || echo failed
west #
 systemctl force-reload ipsec.service || echo failed
west #
 systemctl status ipsec.service >/dev/null || echo failed
west #
 systemctl start ipsec.service || echo failed
west #
 systemctl restart ipsec.service || echo failed
west #
 systemctl status ipsec.service >/dev/null || echo failed
west #
 systemctl start ipsec.service || echo failed
west #
 systemctl condrestart ipsec.service || echo failed
west #
 systemctl status ipsec.service >/dev/null || echo failed
west #
 service ipsec start || echo failed
Redirecting to /bin/systemctl start ipsec.service
west #
 service ipsec status >/dev/null || echo failed
Redirecting to /bin/systemctl status ipsec.service
west #
 service ipsec start || echo failed
Redirecting to /bin/systemctl start ipsec.service
west #
 service ipsec status >/dev/null || echo failed
Redirecting to /bin/systemctl status ipsec.service
west #
 service ipsec restart || echo failed
Redirecting to /bin/systemctl restart ipsec.service
west #
 service ipsec status >/dev/null || echo failed
Redirecting to /bin/systemctl status ipsec.service
west #
 service ipsec stop || echo failed
Redirecting to /bin/systemctl stop ipsec.service
west #
 service ipsec status >/dev/null && echo detected proper failure
Redirecting to /bin/systemctl status ipsec.service
west #
 service ipsec stop || echo failed
Redirecting to /bin/systemctl stop ipsec.service
west #
 service ipsec status >/dev/null && echo detected proper failure
Redirecting to /bin/systemctl status ipsec.service
west #
 service ipsec start || echo failed
Redirecting to /bin/systemctl start ipsec.service
west #
 service ipsec force-reload || echo failed
Redirecting to /bin/systemctl force-reload ipsec.service
west #
 service ipsec status >/dev/null || echo failed
Redirecting to /bin/systemctl status ipsec.service
west #
 service ipsec start || echo failed
Redirecting to /bin/systemctl start ipsec.service
west #
 service ipsec restart || echo failed
Redirecting to /bin/systemctl restart ipsec.service
west #
 service ipsec status >/dev/null || echo failed
Redirecting to /bin/systemctl status ipsec.service
west #
 service ipsec start || echo failed
Redirecting to /bin/systemctl start ipsec.service
west #
 service ipsec condrestart || echo failed
Redirecting to /bin/systemctl condrestart ipsec.service
west #
 service ipsec status >/dev/null || echo failed
Redirecting to /bin/systemctl status ipsec.service
west #
 # test for fix that starts ipsec only after nic/network is online, rhbz#1145245
west #
 grep "After=network-online.target" /lib/systemd/system/ipsec.service
After=network-online.target
west #
 # test for rhbz#1127313 (IPsec holes for IPv6 neighbour discovery)
west #
 ip -o xfrm pol |grep ipv6-icmp
src ::/0 dst ::/0 proto ipv6-icmp type 135 \	dir out priority 1 ptype main \
src ::/0 dst ::/0 proto ipv6-icmp type 135 \	dir fwd priority 1 ptype main \
src ::/0 dst ::/0 proto ipv6-icmp type 135 \	dir in priority 1 ptype main \
src ::/0 dst ::/0 proto ipv6-icmp type 136 \	dir out priority 1 ptype main \
src ::/0 dst ::/0 proto ipv6-icmp type 136 \	dir fwd priority 1 ptype main \
src ::/0 dst ::/0 proto ipv6-icmp type 136 \	dir in priority 1 ptype main \
west #
 # test for rhbz#1572620
west #
 ipsec auto --add mytunnel
002 added IKEv1 connection "mytunnel"
west #
 # will fail
west #
 timeout 10s ipsec auto --up mytunnel
002 "mytunnel" #1: initiating IKEv1 Main Mode connection
1v1 "mytunnel" #1: sent Main Mode request
010 "mytunnel" #1: STATE_MAIN_I1: retransmission; will wait 0.5 seconds for response
010 "mytunnel" #1: STATE_MAIN_I1: retransmission; will wait 1 seconds for response
010 "mytunnel" #1: STATE_MAIN_I1: retransmission; will wait 2 seconds for response
010 "mytunnel" #1: STATE_MAIN_I1: retransmission; will wait 4 seconds for response
010 "mytunnel" #1: STATE_MAIN_I1: retransmission; will wait 8 seconds for response
west #
 ipsec status > /dev/null || echo status should have returned 0
west #
 grep "pending IPsec SA" /tmp/pluto.log
| queuing pending IPsec SA negotiating with 1.2.3.4 IKE SA #1 "mytunnel"
west #
 echo done
done
west #
 
