From patchwork Tue May 26 13:18:57 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jesper Dangaard Brouer X-Patchwork-Id: 27661 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 244BAB6F34 for ; Tue, 26 May 2009 23:36:35 +1000 (EST) Received: by ozlabs.org (Postfix) id 15717DE08D; Tue, 26 May 2009 23:36:35 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id B09ADDE089 for ; Tue, 26 May 2009 23:36:34 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751381AbZEZNgY (ORCPT ); Tue, 26 May 2009 09:36:24 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751358AbZEZNgX (ORCPT ); Tue, 26 May 2009 09:36:23 -0400 Received: from lanfw001a.cxnet.dk ([87.72.215.196]:38932 "EHLO lanfw001a.cxnet.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750943AbZEZNgX (ORCPT ); Tue, 26 May 2009 09:36:23 -0400 X-Greylist: delayed 1050 seconds by postgrey-1.27 at vger.kernel.org; Tue, 26 May 2009 09:36:22 EDT Received: from hotlava.cxnet.dk (unknown [172.31.4.152]) by lanfw001a.cxnet.dk (Postfix) with ESMTP id 83D1616381A; Tue, 26 May 2009 15:18:57 +0200 (CEST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by hotlava.cxnet.dk (Postfix) with ESMTP id 864FB45C066; Tue, 26 May 2009 15:18:57 +0200 (CEST) From: Jesper Dangaard Brouer Subject: [PATCH 2/2] Bugfix: xt_hashlimit does a wrong SEQ_SKIP. To: "David S. Miller" Cc: netdev@vger.kernel.org, netfilter-devel@vger.kernel.org, "Patrick McHardy" , "Jonathan Corbet" , Jesper Dangaard Brouer Date: Tue, 26 May 2009 15:18:57 +0200 Message-ID: <20090526131857.7377.6946.stgit@localhost> In-Reply-To: <20090526131852.7377.68330.stgit@localhost> References: <20090526131852.7377.68330.stgit@localhost> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org (Inside net/netfilter/xt_hashlimit.c) 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 --- net/netfilter/xt_hashlimit.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/netfilter/xt_hashlimit.c b/net/netfilter/xt_hashlimit.c index a5b5369..219dcdb 100644 --- a/net/netfilter/xt_hashlimit.c +++ b/net/netfilter/xt_hashlimit.c @@ -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; }