bugfix: Pull dtdlink and tunnel from remote connections display.

Due to issues we are pulling the showing of tunnels untill we can better detect them.

We are also pulling dtdlink as all AREDN nodes should have dtdlink enabled.
This commit is contained in:
AE6XE 2015-07-01 23:21:51 -07:00 committed by Conrad Lara - KG6JEI
parent 305dbb143e
commit 8e0943f8e0
1 changed files with 11 additions and 10 deletions

View File

@ -42,7 +42,8 @@ BEGIN {push @INC, '/www/cgi-bin'};
use perlfunc;
# collect some variables
$node = nvram_get("node");
$
node = nvram_get("node");
$node = "NOCALL" if $node eq "";
$tactical = nvram_get("tactical");
$config = nvram_get("config");
@ -339,13 +340,13 @@ foreach $ip (keys %hosts)
$rows{$host} = sprintf "<tr><td valign=top><nobr><a href='http://%s:8080/'>%s</a>", $host, $host . $tactical;
undef $nodeiface;
if ( $dtd{$ip} )
{
$nodeiface = "dtd";
if ( $midcount{$ip} ) { $midcount{$ip} -= 1; } # extra mid entry matching and with dtdlink in hosts_olsrd
}
if ( $hosts{$ip}{tactical} ) { $midcount{$ip} -= 1; } # extra mid entry if tactical name defined
if ( $midcount{$ip} ) { $nodeiface = $nodeiface ? "dtd," . "tun*$midcount{$ip}" : "tun*$midcount{$ip}" ; }
#if ( $dtd{$ip} )
#{
#$nodeiface = "dtd";
#if ( $midcount{$ip} ) { $midcount{$ip} -= 1; } # extra mid entry matching and with dtdlink in hosts_olsrd
#}
#if ( $hosts{$ip}{tactical} ) { $midcount{$ip} -= 1; } # extra mid entry if tactical name defined
#if ( $midcount{$ip} ) { $nodeiface = $nodeiface ? "dtd," . "tun*$midcount{$ip}" : "tun*$midcount{$ip}" ; }
if ( $wangateway{$ip} ) { $nodeiface = $nodeiface ? $nodeiface . ",wan" : "wan" ; }
if ( $nodeiface ) { $rows{$host} .= " &nbsp; <small>($nodeiface)</small>"; }
@ -407,8 +408,8 @@ if(keys %links)
if ( $ipmain ne $ip ) # indicate if dtd or tunnel interface to neighbor
{
if ( $hosts{$ip}{name} =~ /^dtdlink\..*$/ ){ $nodeiface="dtd" ; }
elsif ( $hosts{$ip}{name} =~ /^mid\d+\..*$/ ) { $nodeiface="tun" ; }
else { $nodeiface="?" ; }
#elsif ( $hosts{$ip}{name} =~ /^mid\d+\..*$/ ) { $nodeiface="tun" ; }
#else { $nodeiface="?" ; }
}
if ( $wangateway{$ip} or $wangateway{$ipmain} ) { $nodeiface = $nodeiface ? $nodeiface . ",wan" : "wan" ; }