NETFILTER: xt_connbytes: fix division by zero
When the packet counter of a connection is zero a division by zero occurs in div64_64(). Fix that by using zero as average value, which is correct as long as the packet counter didn't overflow, at which point we have lost anyway. Based on patch from Jonas Berlin <xkr47@outerspace.dyndns.org>, with suggestions from KOVACS Krisztian <hidden@balabit.hu>. Signed-off-by:Patrick McHardy <kaber@trash.net> Signed-off-by:
Adrian Bunk <bunk@stusta.de>
Showing
Please register or sign in to comment