All of lore.kernel.org
 help / color / mirror / Atom feed
* [NETFILTER]: Advance seq-file position in exp_next_seq()
@ 2005-06-14  0:56 Patrick McHardy
  2005-06-14  1:28 ` David S. Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Patrick McHardy @ 2005-06-14  0:56 UTC (permalink / raw)
  To: David S. Miller; +Cc: Netfilter Development Mailinglist

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

Hi Dave,

a small fix for 2.6.12 if still possible: exp_next_seq() (used for
/proc/net/ip_conntracK_expect) doesn't advance the seq-file position.
I haven't tracked exactly why, but this makes the seq-file API show
(n+1)*(n/2) entries, with the first one showed n times, the second
one n-1 times, and so on.

Regards
Patrick

[-- Attachment #2: x --]
[-- Type: text/plain, Size: 876 bytes --]

[NETFILTER]: Advance seq-file position in exp_next_seq()

Signed-off-by: Patrick McHardy <kaber@trash.net>

---
commit 5cc89cae827217a8183d4eb1165cc32f804518fa
tree 7284df19ea5b31f63777407cec1adfd703fa7958
parent f268bb805a9777d5c82c7c1cb683b476d65f0c1b
author Patrick McHardy <kaber@trash.net> Sat, 11 Jun 2005 19:21:28 +0200
committer Patrick McHardy <kaber@trash.net> Sat, 11 Jun 2005 19:21:28 +0200

 net/ipv4/netfilter/ip_conntrack_standalone.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/netfilter/ip_conntrack_standalone.c b/net/ipv4/netfilter/ip_conntrack_standalone.c
--- a/net/ipv4/netfilter/ip_conntrack_standalone.c
+++ b/net/ipv4/netfilter/ip_conntrack_standalone.c
@@ -256,6 +256,7 @@ static void *exp_seq_next(struct seq_fil
 {
  	struct list_head *e = v;
 
+	++*pos;
 	e = e->next;
 
 	if (e == &ip_conntrack_expect_list)

^ permalink raw reply	[flat|nested] 3+ messages in thread
[parent not found: <200506140159.j5E1xRb7019657@hera.kernel.org>]

end of thread, other threads:[~2005-06-15 20:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-14  0:56 [NETFILTER]: Advance seq-file position in exp_next_seq() Patrick McHardy
2005-06-14  1:28 ` David S. Miller
     [not found] <200506140159.j5E1xRb7019657@hera.kernel.org>
2005-06-15 20:47 ` Florian Weimer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.