<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 8 Feb 2020 at 10:05, Paul Wouters <<a href="mailto:paul@nohats.ca">paul@nohats.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">The reason I did t use ping-once is because it seems bound to a —up or —down and I didn’t want the connection modified ?<div><br></div><div>Am I misunderstanding the script?</div></div></blockquote><div><br></div><div>For ping-once, --up and --down just indicate if a response is expected (the other end is up?), with timeouts tuned accordingly.  They don't directly manipulate the connection.</div><div><br></div><div>The more useful one though is wait-for.sh, it keeps probing pluto until it gets the output it wants.  for instance, instead of 'sleep 3':</div><div><br></div><div>  #  ../../pluto/bin/wait-for.sh --match '"private-or-clear#<a href="http://192.1.2.0/24" target="_blank">192.1.2.0/24</a>"' -- ipsec whack --trafficstatus</div><div><br></div><div>keeps running 'ipsec whack --trafficstatus' (it also sleeps) until this output:</div><div><br>  006 #2: "private-or-clear#<a href="http://192.1.2.0/24" target="_blank">192.1.2.0/24</a>"[1] ...192.1.2.23, type=ESP, add_time=1234567890, inBytes=0, outBytes=0, id='ID_NULL'<br></div><div><br></div><div>appears - the connection is up but no traffic has yet flowed because only the first ping eaten by the shunt was sent.  It doesn't matter if it takes 1, 3 or even 10 seconds.  Just as long as it happens (the default timeout is 15s from memory).</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><br></div><div>A lot of carefully timed tests will fail with a 3 second random delay though. Especially those engineered with short timers <br><br><div id="gmail-m_4454466654552074506AppleMailSignature" dir="ltr">Sent from my iPhone</div><div dir="ltr"><br>On Feb 7, 2020, at 21:43, Andrew Cagney <<a href="mailto:andrew.cagney@gmail.com" target="_blank">andrew.cagney@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><br><br>On Fri, 7 Feb 2020 at 16:45, Paul Wouters <<a href="mailto:paul@vault.libreswan.fi" target="_blank">paul@vault.libreswan.fi</a>> wrote:<br>> commit e70651a682602916773c0a09fa12a7ac8bda8c0e<br>> Author: Paul Wouters <<a href="mailto:pwouters@redhat.com" target="_blank">pwouters@redhat.com</a>><br>> Date:   Fri Feb 7 16:28:22 2020 -0500<br>><br>>     testing: stabilize newoe-25-cat-4<br>><br><br><div style="margin-left:40px">road #<br>sleep 3</div><div><br></div><div>waiting a magic 3 seconds isn't more stable - load the machine and watch it fail.  Nor is 'ping -n -c 3' (it can send 4 pings).   Try this:<br></div><div>road #<br> # trigger OE<br>road #<br> ../../pluto/bin/ping-once.sh --down -I 192.1.3.209 192.1.2.23<br>down<br>road #<br> ../../pluto/bin/wait-for.sh --match '"private-or-clear#<a href="http://192.1.2.0/24" target="_blank">192.1.2.0/24</a>"' -- ipsec whack --trafficstatus<br>006 #2: "private-or-clear#<a href="http://192.1.2.0/24" target="_blank">192.1.2.0/24</a>"[1] ...192.1.2.23, type=ESP, add_time=1234567890, inBytes=0, outBytes=0, id='ID_NULL'<br>road #<br> ../../pluto/bin/ping-once.sh --up   -I 192.1.3.209 192.1.2.23<br>up<br></div><div><br></div><div><br></div><div><div><br><div><div style="margin-left:40px">road #<br>ping -n -c 3 -I 192.1.3.209 192.1.2.23<br>PING 192.1.2.23 (192.1.2.23) from 192.1.3.209 : 56(84) bytes of data.<br>64 bytes from <a href="http://192.1.2.23" target="_blank">192.1.2.23</a>: icmp_seq=1 ttl=64 time=0.XXX ms<br>64 bytes from <a href="http://192.1.2.23" target="_blank">192.1.2.23</a>: icmp_seq=2 ttl=64 time=0.XXX ms<br>64 bytes from <a href="http://192.1.2.23" target="_blank">192.1.2.23</a>: icmp_seq=3 ttl=64 time=0.XXX ms<br>64 bytes from <a href="http://192.1.2.23" target="_blank">192.1.2.23</a>: icmp_seq=4 ttl=64 time=0.XXX ms<br>--- 192.1.2.23 ping statistics ---<br>4 packets transmitted, 3 received, 25% packet loss, time XXXX<br>3 packets transmitted, 3 received, 0% packet loss, time XXXX</div></div></div></div></div>
</div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>Swan-dev mailing list</span><br><span><a href="mailto:Swan-dev@lists.libreswan.org" target="_blank">Swan-dev@lists.libreswan.org</a></span><br><span><a href="https://lists.libreswan.org/mailman/listinfo/swan-dev" target="_blank">https://lists.libreswan.org/mailman/listinfo/swan-dev</a></span><br></div></blockquote></div></div></blockquote></div></div>