]> git.karo-electronics.de Git - karo-tx-linux.git/commit
NETFILTER: xt_connbytes: fix division by zero
authorPatrick McHardy <kaber@trash.net>
Sat, 24 Mar 2007 20:26:20 +0000 (21:26 +0100)
committerAdrian Bunk <bunk@stusta.de>
Sat, 24 Mar 2007 20:26:20 +0000 (21:26 +0100)
commit18adb12b78b7c4d4a04401bd42c23b3f157c7ac1
tree63749852c3ee85a57940808439eb9a73250beaa2
parent0fbd895ff3731da9b7d7e2f1d182354297747b7b
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>
net/netfilter/xt_connbytes.c