path: root/utils/nfnl_osf.c
diff options
authorJan Engelhardt <>2012-07-28 19:10:08 +0200
committerPablo Neira Ayuso <>2012-07-31 13:32:26 +0200
commit9d69da4bdb1d546218d168b72f12ac8aa042e3d8 (patch)
tree781a8b8638bcba108c85f18f8b91bc85e11f43f4 /utils/nfnl_osf.c
parenta19988f2795770ce470562c1795e1cf53e3aa54b (diff)
libxt_*limit: avoid division by zero
It was possible to specify -A mychain -m hashlimit --hashlimit 600059/minute; this would convert to r->avg=0, which subsequently causes a division by zero when printing with -S mychain. 1. Avoid division by zero in print_rate by printing infinity instead. 2. Rewrite the test in parse_rate to properly reject too high rates. Signed-off-by: Jan Engelhardt <>
Diffstat (limited to 'utils/nfnl_osf.c')
0 files changed, 0 insertions, 0 deletions