]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - html/cgi-bin/network.cgi
Fix external network graphs if traffic not goes over red0
[ipfire-2.x.git] / html / cgi-bin / network.cgi
index 50f70a64f02f82d388ac47215b3813e0b7064ff8..a6145fa20de70fc7c229fc710fcb7669706e5e11 100644 (file)
@@ -50,7 +50,13 @@ $cgiparams[1] = '' unless defined $cgiparams[1];
 
 if ($cgiparams[1] =~ /red/) {
        &Header::openpage($Lang::tr{'network traffic graphs external'}, 1, '');
-       push (@graphs, ($netsettings{'RED_DEV'}));
+       if ($netsettings{'RED_TYPE'} ne 'PPPOE') {
+           if ($netsettings{'RED_DEV'} ne $netsettings{'GREEN_DEV'}) {
+               push (@graphs, ($netsettings{'RED_DEV'}));
+           }
+       } else {
+           push (@graphs, "ppp0");
+       }
        if (-e "/var/log/rrd/collectd/localhost/interface/if_octets-ipsec0.rrd") {push (@graphs, ("ipsec0"));}
 }elsif ($cgiparams[1] =~ /other/) {
        &Header::openpage($Lang::tr{'network traffic graphs others'}, 1, '');