X-Git-Url: https://git.harvie.cz/?a=blobdiff_plain;f=prometheus.c;h=4c8b8eaa42892b4cf389c9ea9a77719cda50d5bd;hb=57cbdd526da8ce682d1a8c788e461bcbc7eefa76;hp=a3619dbea84844729b7b71daaf41b16f3906e8e6;hpb=33c2a33ddc91ec1dbacce09a12d96207a5e6df22;p=svn%2FPrometheus-QoS%2F.git diff --git a/prometheus.c b/prometheus.c index a3619db..4c8b8ea 100644 --- a/prometheus.c +++ b/prometheus.c @@ -290,7 +290,7 @@ void get_config(char *config_filename) option("hosts",hosts); option("downstream-interfaces-list-filename",downstreamfile); option("upstream-interfaces-list-filename",upstreamfile); - option("macros-filename",upstreamfile); + option("macros-filename",macrosfile); option("ip6-prefix",ip6prefix); option("medium",medium); ioption("hall-of-fame-enable",hall_of_fame); @@ -540,7 +540,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); /*-----------------------------------------------------------------*/ printf("Parsing downstream interfaces list %s ...\n", downstreamfile); /*-----------------------------------------------------------------*/ - parse(upstreamfile) + parse(downstreamfile) { ptr = parse_datafile_line(_); if(ptr) @@ -558,7 +558,7 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); interface->chain = "POSTROUTING"; interface->idxprefix = "post"; push(interface, interfaces); - printf("Upstream interface %s: medium %s capacity %ld kbps\n", interface->name, medium, interface->speed); + printf("Downstream interface %s: medium %s capacity %ld kbps\n", interface->name, medium, interface->speed); } } done; /* ugly macro end */ @@ -1369,14 +1369,13 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); /* tc handle 1 fw flowid */ sprintf(str,"%s filter add dev %s parent 1:0 protocol ip handle %d fw flowid 1:%d", tc, interface->name, FREE_CLASS, FREE_CLASS); safe_run(str); - - /*-----------------------------------------------------------------*/ - puts("Generating bandwith class for overlimit packets..."); - /*-----------------------------------------------------------------*/ - sprintf(str, "%s class add dev %s parent 1:%d classid 1:%d htb rate %dkbit ceil %dkbit burst %dk prio %d", - tc, interface->name, parent, OVERLIMIT_CLASS, overlimit_min, overlimit_max, burst, lowest_priority); - safe_run(str); } + /*-----------------------------------------------------------------*/ + puts("Generating bandwith class for overlimit packets..."); + /*-----------------------------------------------------------------*/ + sprintf(str, "%s class add dev %s parent 1:%d classid 1:%d htb rate %dkbit ceil %dkbit burst %dk prio %d", + tc, interface->name, parent, OVERLIMIT_CLASS, overlimit_min, overlimit_max, burst, lowest_priority); + safe_run(str); } printf("Total IP count: %d\n", i); run_iptables_restore();