X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=prometheus.c;h=717971410549b1ce35de9bc6eadc77ce1ae55fe3;hp=07980f637bfbd4a3762065dc7e3b812b974678f6;hb=a1204fc9fd3dab261b08e0d1491ec4099a762c5a;hpb=1c9cae56507516acf3eda8fcfe60a74bfe923ee4 diff --git a/prometheus.c b/prometheus.c index 07980f6..7179714 100644 --- a/prometheus.c +++ b/prometheus.c @@ -181,31 +181,9 @@ struct Index } *idxs=NULL, *idx, *metaindex; -/* Damned, this must be object oriented! This looks almost like constructor ;-) */ -void TheIP(void) -{ - create(ip,IP); - ip->name = ""; - ip->addr = ""; - ip->sharing = NULL; - ip->prio = highest_priority+1; - ip->lmsid = -1; - ip->fixedprio = \ - ip->mark = \ - ip->min = \ - ip->max = \ - ip->desired = \ - ip->credit = \ - ip->upload = \ - ip->proxy = \ - ip->direct = \ - ip->traffic = \ - ip->pktsup = \ - ip->pktsdown = 0; - ip->keyword = keywords; - push(ip,ips); -} +void TheIP(void); +/* function implemented in parsehosts.c */ /* ====== iptables indexes are used to reduce complexity to log8(N) ===== */ @@ -881,11 +859,11 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); if(qos_proxy) { save_line(":post_noproxy - [0:0]"); - sprintf(str,"-A POSTROUTING -p ! tcp -o %s -j post_noproxy", lan); + sprintf(str,"-A POSTROUTING ! -p tcp -o %s -j post_noproxy", lan); save_line(str); - sprintf(str,"-A POSTROUTING -s ! %s -o %s -j post_noproxy", proxy_ip, lan); + sprintf(str,"-A POSTROUTING ! -s %s -o %s -j post_noproxy", proxy_ip, lan); save_line(str); - sprintf(str,"-A POSTROUTING -s %s -p tcp --sport ! %d -o %s -j post_noproxy", proxy_ip, proxy_port, lan); + sprintf(str,"-A POSTROUTING -s %s -p tcp ! --sport %d -o %s -j post_noproxy", proxy_ip, proxy_port, lan); save_line(str); chain="post_noproxy";