netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: pablo@netfilter.org
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 8/8] netfilter: xt_CT: fix wrong checking in the timeout assignment path
Date: Mon, 30 Apr 2012 17:16:55 +0200	[thread overview]
Message-ID: <1335799015-2003-9-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1335799015-2003-1-git-send-email-pablo@netfilter.org>

From: Pablo Neira Ayuso <pablo@netfilter.org>

The current checking always succeeded. We have to check the first
character of the string to check that it's empty, thus, skipping
the timeout path.

This fixes the use of the CT target without the timeout option.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 net/netfilter/xt_CT.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index 59530e9..3746d8b 100644
--- a/net/netfilter/xt_CT.c
+++ b/net/netfilter/xt_CT.c
@@ -227,7 +227,7 @@ static int xt_ct_tg_check_v1(const struct xt_tgchk_param *par)
 	}
 
 #ifdef CONFIG_NF_CONNTRACK_TIMEOUT
-	if (info->timeout) {
+	if (info->timeout[0]) {
 		typeof(nf_ct_timeout_find_get_hook) timeout_find_get;
 		struct nf_conn_timeout *timeout_ext;
 
-- 
1.7.9.5

  parent reply	other threads:[~2012-04-30 15:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-30 15:16 [PATCH 0/8] netfilter updates for 3.4-rc5 pablo
2012-04-30 15:16 ` [PATCH 1/8] ipvs: Verify that IP_VS protocol has been registered pablo
2012-04-30 15:16 ` [PATCH 2/8] ipvs: fix crash in ip_vs_control_net_cleanup on unload pablo
2012-04-30 15:16 ` [PATCH 3/8] ipvs: add check in ftp for initialized core pablo
2012-04-30 15:16 ` [PATCH 4/8] ipvs: reset ipvs pointer in netns pablo
2012-04-30 15:16 ` [PATCH 5/8] ipvs: null check of net->ipvs in lblc(r) shedulers pablo
2012-04-30 15:16 ` [PATCH 6/8] ipvs: take care of return value from protocol init_netns pablo
2012-04-30 15:16 ` [PATCH 7/8] ipvs: kernel oops - do_ip_vs_get_ctl pablo
2012-04-30 15:16 ` pablo [this message]
2012-04-30 17:23 ` [PATCH 0/8] netfilter updates for 3.4-rc5 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1335799015-2003-9-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).