aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter/xt_CT.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2011-04-21 11:05:14 +0200
committerPatrick McHardy <kaber@trash.net>2011-04-21 11:05:14 +0200
commita7fed7620b6eeaba98a558df46bb50a31828b462 (patch)
tree1f9dfd9644a483e7a902ff19f7cf05d4ab0fd24d /net/netfilter/xt_CT.c
parentsctp: Release all routes when processing acks ADD_IP or DEL_IP (diff)
downloadlinux-dev-a7fed7620b6eeaba98a558df46bb50a31828b462.tar.xz
linux-dev-a7fed7620b6eeaba98a558df46bb50a31828b462.zip
netfilter: xt_CT: provide info on why a rule was rejected
Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'net/netfilter/xt_CT.c')
-rw-r--r--net/netfilter/xt_CT.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/netfilter/xt_CT.c b/net/netfilter/xt_CT.c
index 782e51986a6f..0221d10de75a 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);