From 7d05bfc0742ea64ad5b1b5511a0c89a8da0badcc Mon Sep 17 00:00:00 2001 From: xchaos Date: Wed, 20 Nov 2013 21:54:22 +0000 Subject: [PATCH] proxy taffic shaping will be obsolete feature in 0.8.4 git-svn-id: https://dev.arachne.cz/repos/prometheus/trunk@237 251d49ef-1d17-4917-a970-b30cf55b089b --- parseiptables.c | 12 ++++++------ prometheus.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/parseiptables.c b/parseiptables.c index ea9ef96..cfd1add 100644 --- a/parseiptables.c +++ b/parseiptables.c @@ -173,22 +173,22 @@ void get_traffic_statistics(const char *whichiptables, int ipv6) { ip->traffic += traffic; } - ip->direct = ip->traffic-ip->upload-ip->proxy; - ip->pktsdown = pkts; + ip->direct += ip->traffic-ip->upload-ip->proxy; + ip->pktsdown += pkts; } else { - ip->upload = traffic; - ip->pktsup = pkts; + ip->upload += traffic; + ip->pktsup += pkts; if(include_upload) { ip->traffic += traffic; } else { - if(traffic > ip->traffic) + if(ip->upload > ip->traffic) { - ip->traffic = traffic; + ip->traffic = ip->upload; } } } diff --git a/prometheus.c b/prometheus.c index dea239a..b6807fd 100644 --- a/prometheus.c +++ b/prometheus.c @@ -98,7 +98,7 @@ char *ip6prefix = NULL; /* Prefix for global /48 IPv6 subnet */ char *wan_medium = "100Mbit"; /* 10Mbit/100Mbit ethernet */ char *qos_leaf = "sfq perturb 5"; /* leaf discipline */ char *qos_free_zone = NULL; /* QoS free zone */ -int qos_proxy = TRUE; /* include proxy port to QoS */ +/* int qos_proxy = TRUE; include proxy port to QoS */ int found_lmsid = FALSE; /* show links to users in LMS information system */ int include_upload = TRUE; /* upload+download=total traffic */ char *proxy_ip = "192.168.1.1/32"; /* our IP with proxy port */ @@ -310,7 +310,7 @@ void get_config(char *config_filename) ioption("use-jquery-popups",use_jquery_popups); option("qos-free-zone",qos_free_zone); ioption("qos-free-delay",qos_free_delay); - ioption("qos-proxy-enable",qos_proxy); +/* ioption("qos-proxy-enable",qos_proxy); */ option("qos-proxy-ip",proxy_ip); option("htb-leaf-discipline",qos_leaf); ioption("qos-proxy-port",proxy_port); -- 2.30.2