netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* netfilter: xt_CT: provide info on why a rule was rejected
@ 2011-04-18  1:17 Jan Engelhardt
  2011-04-21  9:06 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2011-04-18  1:17 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Netfilter Developer Mailing List

parent 653393692ac5b0baabf707bb94d20e5c661a27c0 (v2.6.38-rc1-195-g6533936)
commit acbba5911da72a6a4df17c508b332b89c87efe7f
Author: Jan Engelhardt <jengelh@medozas.de>
Date:   Tue Mar 1 14:16:12 2011 +0100

netfilter: xt_CT: provide info on why a rule was rejected

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
---
 net/netfilter/xt_CT.c |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index 782e519..0221d10 100644
--- a/net/netfilter/xt_CT.c
+++ b/net/netfilter/xt_CT.c
@@ -5,7 +5,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
-
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 #include <linux/module.h>
 #include <linux/gfp.h>
 #include <linux/skbuff.h>
@@ -95,8 +95,11 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par)
 	if (info->helper[0]) {
 		ret = -ENOENT;
 		proto = xt_ct_find_proto(par);
-		if (!proto)
+		if (!proto) {
+			pr_info("You must specify a L4 protocol, "
+				"and not use inversions on it.\n");
 			goto err3;
+		}
 
 		ret = -ENOMEM;
 		help = nf_ct_helper_ext_add(ct, GFP_KERNEL);
@@ -107,8 +110,10 @@ static int xt_ct_tg_check(const struct xt_tgchk_param *par)
 		help->helper = nf_conntrack_helper_try_module_get(info->helper,
 								  par->family,
 								  proto);
-		if (help->helper == NULL)
+		if (help->helper == NULL) {
+			pr_info("No such helper \"%s\"\n", info->helper);
 			goto err3;
+		}
 	}
 
 	__set_bit(IPS_TEMPLATE_BIT, &ct->status);
-- 
# Created with git-export-patch


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: netfilter: xt_CT: provide info on why a rule was rejected
  2011-04-18  1:17 netfilter: xt_CT: provide info on why a rule was rejected Jan Engelhardt
@ 2011-04-21  9:06 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2011-04-21  9:06 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Netfilter Developer Mailing List

On 18.04.2011 03:17, Jan Engelhardt wrote:
> netfilter: xt_CT: provide info on why a rule was rejected

Applied, thanks Jan.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-04-21  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-18  1:17 netfilter: xt_CT: provide info on why a rule was rejected Jan Engelhardt
2011-04-21  9:06 ` Patrick McHardy

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).