X-Git-Url: https://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=parsehosts.c;h=7e12a41b34d1280821ef1c916e417675fade4b4a;hp=9ae1d811f827bf9971e642a8015fffef70b256da;hb=a25842fafee4469c8acbacd673fc4c905bcab3f9;hpb=8e7aa99528485133231579d5933643eecfe0e0af diff --git a/parsehosts.c b/parsehosts.c index 9ae1d81..7e12a41 100644 --- a/parsehosts.c +++ b/parsehosts.c @@ -259,8 +259,9 @@ void parse_hosts(char *hosts) } } - /* MTU is 1450 bytes = 11600 bits ~= 12 kbit, max is in kb/s */ - ip->pps_limit = ip->max/12; + /* MTU is 1450 bytes = 11600 bits ~= 12 kbit, max is in kb/s + average pkt 1/2 MTU = 6 kbit*/ + ip->pps_limit = ip->max/6; if(ip->pps_limit > 10000) /* this limit seems to be hardcoded in iptables */ { ip->pps_limit = 0; /* do not apply packet limits */