]> git.ipfire.org Git - thirdparty/nftables.git/commit
statement: Fix get_rate() for zero byte_rate
authorPhil Sutter <phil@nwl.cc>
Tue, 24 Apr 2018 09:46:01 +0000 (11:46 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 24 Apr 2018 10:06:22 +0000 (12:06 +0200)
commit3261e9cf14a8a80b9f524009502edf1ccd8da5eb
tree1271b84511a4afd422087bfcb04d208daacd1f51
parent87650476c4a2da66e8641e04566655b85f63bb43
statement: Fix get_rate() for zero byte_rate

The algorithm didn't detect whether given byte_rate was zero,
pointlessly iterating through data units. Make it exit early in this
case.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/statement.c