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
Signed-off-by: Willy Tarreau <w@1wt.eu>
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;