Skip to content

Commit

Permalink
netfilter: xt_hashlimit does a wrong SEQ_SKIP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jesper Dangaard Brouer authored and Patrick McHardy committed May 27, 2009
1 parent b38b1f6 commit 683a04c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/xt_hashlimit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 683a04c

Please sign in to comment.