diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2011-05-02 16:38:11 +0200 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2011-05-09 00:18:22 +0200 |
commit | 39d3aa36ea38668a2c343b5af42b2d8d3616a9de (patch) | |
tree | 4b43df0411d93a1332c2beeed55d60a6e40cd5b5 /extensions/libip6t_mh.c | |
parent | d118d21ea3108f94ca1f84f11dd39f3f12e9ee2b (diff) |
libxt_statistic: increase precision on create and dump
Currently, libxt_statistic only dumps the probability with a
granularity of 1/1000000. Assuming only stuffed packets with 1440
bytes payload, this would match approximately every 1.341 GB, which is
pretty low for a high-volume router. Trying to match any larger
interval than that (e.g. 2 GB) will cause libxt_statistic to output
"--probability 0.000000", and when restored, will cause it to never
match again.
Bump the dump precision to what xt_statistic can really do, and adjust
the manpage to include a word about it.
Furthermore, employ explicit rounding when reading the argument from
the command line, because the previous implicit conversion would use
truncation, which is not very exact.
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'extensions/libip6t_mh.c')
0 files changed, 0 insertions, 0 deletions