From 6e43702fb56a80f491f0c9cb9d19f29bced46f7f Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Fri, 11 Oct 2019 21:41:18 +0100 Subject: [PATCH] test: send an initial ping packet The hex data came from ping -I secnet-test-i 172.18.232.1 tcpdump -wt -isecnet-test-i tcpdump -rt -x We send it twice because the first causes a key exchange and then gets lost. The result is that the script crashes with inside rx'd! This is because we are pinging the remote secnet, which responds without sending the packet to its host (ie, "outside.r" in our terms). Signed-off-by: Ian Jackson --- test/invoke | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/invoke b/test/invoke index 30106d9..7182d13 100755 --- a/test/invoke +++ b/test/invoke @@ -139,7 +139,24 @@ $message exit 1 } +proc sendpkt {} { + global netlinkfh + set p { + 4500 0054 ed9d 4000 4001 24da ac12 e809 + ac12 e802 0800 1de4 2d96 0001 f1d4 a05d + 0000 0000 507f 0b00 0000 0000 1011 1213 + 1415 1617 1819 1a1b 1c1d 1e1f 2021 2223 + 2425 2627 2829 2a2b 2c2d 2e2f 3031 3233 + 3435 3637 + } + puts -nonewline $netlinkfh(inside.t) \ + [hbytes h2raw c0[join $p ""]c0] +} + spawn-secnet inside spawn-secnet outside +after 500 sendpkt +after 1000 sendpkt + vwait ok -- 2.30.2