X-Git-Url: http://git.harvie.cz/?a=blobdiff_plain;f=htmlandlogs.c;h=8bcfe71f2e36832e0633eae6ac79e895ab543a02;hb=f64d54310ae39276c552b80183ae2320789bb4be;hp=98af96c4a3fb22b34208d9e0bd8b5c3c9450beb8;hpb=f19d3cd0bca8ef24e8c78fb6ae24346dc3b7db36;p=svn%2FPrometheus-QoS%2F.git
diff --git a/htmlandlogs.c b/htmlandlogs.c
index 98af96c..8bcfe71 100644
--- a/htmlandlogs.c
+++ b/htmlandlogs.c
@@ -191,11 +191,16 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview)
{
fprintf(f,"",i);
popup_button=0;
- for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing))
+ for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,':')) /* IPv4 only */
{
fprintf(f,"
%s\n", log_url, sharedip->name, sharedip->name);
popup_button++;
}
+ for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,'.')) /* IPv6 only */
+ {
+ fprintf(f,"
%s\n", log_url, sharedip->name, sharedip->addr);
+ popup_button++;
+ }
fputs("\n",f);
if(popup_button)
{
@@ -229,7 +234,11 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview)
if(use_jquery_popups)
{
fprintf(f,"",i);
- for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing))
+ for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,':')) /* IPv4 only */
+ {
+ fprintf(f,"
%Lu", sharedip->direct);
+ }
+ for_each(sharedip, ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,'.')) /* IPv6 only */
{
fprintf(f,"
%Lu", sharedip->direct);
}
@@ -247,7 +256,11 @@ void write_htmlandlogs(char *html, char *d, int total, int just_preview)
if(use_jquery_popups)
{
fprintf(f,"",i);
- for_each(sharedip,ips) if(eq(ip->name, sharedip->sharing))
+ for_each(sharedip,ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,':')) /* IPv4 only */
+ {
+ fprintf(f,"
%Lu", sharedip->upload);
+ }
+ for_each(sharedip,ips) if(eq(ip->name, sharedip->sharing) && !strchr(sharedip->addr,'.')) /* IPv6 only */
{
fprintf(f,"
%Lu", sharedip->upload);
}