5 $dump="/var/tmp/route6d_dump";
6 $pidfile="/var/run/route6d.pid";
10 open(FD
, "< $pidfile") || die "Can not open $pidfile";
14 system("kill -INT $_");
16 open(NS
, "/usr/bin/netstat -r -n|") || die "Can not open netstat";
19 next unless (/^3f/ || /^5f/);
28 open(FD
, "< $dump") || die "Can not open $dump";
31 next unless (/^ 3f/ || /^ 5f/);
34 $f[2] =~ /if\(\d:([a-z0-9]+)\)/;
36 $f[3] =~ /gw\(([a-z0-9:]+)\)/;
40 $f[5] =~ /age\((\d+)\)/;
42 unless (defined($gw{$dst})) {
43 print "NOT FOUND: $dst $intf $gateway $metric $age\n";
47 if ($gw{$dst} ne $gateway && $gw{$dst} !~ /link#\d+/) {
48 print "WRONG GW: $dst $intf $gateway $metric $age\n";
49 print "kernel gw: $gw{$dst}\n";
53 if ($int{$dst} ne $intf) {
54 print "WRONG IF: $dst $intf $gateway $metric $age\n";
55 print "kernel if: $int{$dst}\n";
63 print "No error found\n";