diff options
author | Xiong Wu <xiong_wu@cpsecure.com> | 2008-07-04 13:21:15 +0200 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2008-07-20 19:13:58 +0200 |
commit | 32816d3085707f26e9a3fd9c72133feac206185d (patch) | |
tree | 55d04f7e7ebbdc9894336ea99f70e5f80d5071f3 | |
parent | 0cce192bdca65bd336e6f40a901c10a421851115 (diff) | |
download | linux-2.4-32816d3085707f26e9a3fd9c72133feac206185d.tar.gz |
Correct the upto value during list conntrack information
The problem:
When list numerous conntrack information from /proc/net/ip_conntrack,
we found some items are missing.
The solution:
This patch correct the upto value in conntrack_iterate() when the length
of conntrack information exceed the max length.
Cc: Patrick McHardy <kaber@trash.net>
Cc: coreteam@netfilter.org
-rw-r--r-- | net/ipv4/netfilter/ip_conntrack_standalone.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c index c64a3a781c9bba..8ca73349d10428 100644 --- a/net/ipv4/netfilter/ip_conntrack_standalone.c +++ b/net/ipv4/netfilter/ip_conntrack_standalone.c @@ -131,8 +131,11 @@ conntrack_iterate(const struct ip_conntrack_tuple_hash *hash, return 0; newlen = print_conntrack(buffer + *len, hash->ctrack); - if (*len + newlen > maxlen) + + if (*len + newlen > maxlen) { + (*upto)--; return 1; + } else *len += newlen; return 0; |