2 # Generate a ton of connections and check if we can see syn/ack packets via tcpdump
4 my $guineapig="vini-veritas.net";
5 my $ttraceroute="/usr/sbin/tcptraceroute";
6 my $traceroute="/usr/sbin/tracepath";
8 sub open_tcptraceroute {
9 if (!-e "$ttraceroute") {
10 die("[FAILED] Please install tcptraceroute in the slice before running this test\n");
12 my $cmdline="$ttraceroute $guineapig";
18 if (/\((\d+\.\d+\.\d+\.\d+)\)/) {
19 $result{$1}=$result{$1}+1;
27 if (!-e "$traceroute") {
28 die("[FAILED] Please install tcptraceroute in the slice before running this test\n");
31 my $cmdline="$traceroute $guineapig";
37 if (/\((\d+\.\d+\.\d+\.\d+)\)/) {
38 $result{$1}=$results{$1}+1;
52 print "$_->".$a1{$_}."\n";
56 } elsif ($a1{$_}==2) {
60 else { die ("bug in test script");}
63 return ($single,$double);
67 print "[FAILED] Timed out waiting\n";
71 print "Starting tcptraceroute...\n";
77 %r1=open_tcptraceroute;
78 %r1=open_traceroute %r1;
79 ($s,$d)=compare(\%r1);
81 print "[SUCCESS] traceroute and tcptraceroute reported the same result. $d hops.\n";
85 print "[PARTIAL SUCCESS] traceroute and tcptraceroute reported $s different hops out of $d.\n";
88 print "[FAILED] traceroute and tcptraceroute reported different results\n";
92 print "Generating connections...\n";
93 $SIG{ALRM}=\&alhandler;