X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=parsehosts.c;h=9ae1d811f827bf9971e642a8015fffef70b256da;hp=5014ffb8287cb168d2c6b5df709745ddb25eff7d;hb=06733b885c35e5bf83505d064c55ccdda848ac01;hpb=c38473c17cd984140f177ccb2000089e10444299 diff --git a/parsehosts.c b/parsehosts.c index 5014ffb..9ae1d81 100644 --- a/parsehosts.c +++ b/parsehosts.c @@ -258,10 +258,15 @@ void parse_hosts(char *hosts) ip->max = ip->min; } } - + /* MTU is 1450 bytes = 11600 bits ~= 12 kbit, max is in kb/s */ ip->pps_limit = ip->max/12; - ip->mark = FIRSTIPCLASS+1+class_count++; + if(ip->pps_limit > 10000) /* this limit seems to be hardcoded in iptables */ + { + ip->pps_limit = 0; /* do not apply packet limits */ + } + + ip->mark = FIRSTIPCLASS+1+class_count++; update_network(ip->addr, ip); if_exists(group,groups,(group->min == ip->min))