netfilter: xt_hashlimit does a wrong SEQ_SKIP
authorJesper Dangaard Brouer <hawk@comx.dk>
Wed, 27 May 2009 13:45:34 +0000 (15:45 +0200)
committerPatrick McHardy <kaber@trash.net>
Wed, 27 May 2009 13:45:34 +0000 (15:45 +0200)
The function dl_seq_show() returns 1 (equal to SEQ_SKIP) in case
a seq_printf() call return -1.  It should return -1.

This SEQ_SKIP behavior brakes processing the proc file e.g. via a
pipe or just through less.

Signed-off-by: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/netfilter/xt_hashlimit.c

index a5b5369c30f9e3ce88787818902c2227abfbe903..219dcdbe388cb08db07824ab53fe4c02089e5685 100644 (file)
@@ -926,7 +926,7 @@ static int dl_seq_show(struct seq_file *s, void *v)
        if (!hlist_empty(&htable->hash[*bucket])) {
                hlist_for_each_entry(ent, pos, &htable->hash[*bucket], node)
                        if (dl_seq_real_show(ent, htable->family, s))
-                               return 1;
+                               return -1;
        }
        return 0;
 }