aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>2015-05-21 09:57:12 -0400
committerPablo Neira Ayuso <pablo@netfilter.org>2015-06-12 08:06:24 -0400
commit779668450a990d402d316ffd9b7b103fbe5ab6f3 (patch)
treea9967d17f449a2f28f9dd2afec488e1160e3a49a /net/netfilter
parentc63264def3393dd123bfa630a7a46b5d6d2d6038 (diff)
netfilter: conntrack: warn the user if there is a better helper to use
After db29a9508a92 ("netfilter: conntrack: disable generic tracking for known protocols"), if the specific helper is built but not loaded (a standard for most distributions) systems with a restrictive firewall but weak configuration regarding netfilter modules to load, will silently stop working. This patch then puts a warning message so the sysadmin knows where to start looking into. It's a pr_warn_once regardless of protocol itself but it should be enough to give a hint on where to look. Cc: Florian Westphal <fw@strlen.de> Cc: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_conntrack_proto_generic.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/netfilter/nf_conntrack_proto_generic.c b/net/netfilter/nf_conntrack_proto_generic.c
index 60865f110309..2281be419a74 100644
--- a/net/netfilter/nf_conntrack_proto_generic.c
+++ b/net/netfilter/nf_conntrack_proto_generic.c
@@ -90,7 +90,13 @@ static int generic_packet(struct nf_conn *ct,
90static bool generic_new(struct nf_conn *ct, const struct sk_buff *skb, 90static bool generic_new(struct nf_conn *ct, const struct sk_buff *skb,
91 unsigned int dataoff, unsigned int *timeouts) 91 unsigned int dataoff, unsigned int *timeouts)
92{ 92{
93 return nf_generic_should_process(nf_ct_protonum(ct)); 93 bool ret;
94
95 ret = nf_generic_should_process(nf_ct_protonum(ct));
96 if (!ret)
97 pr_warn_once("conntrack: generic helper won't handle protocol %d. Please consider loading the specific helper module.\n",
98 nf_ct_protonum(ct));
99 return ret;
94} 100}
95 101
96#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT) 102#if IS_ENABLED(CONFIG_NF_CT_NETLINK_TIMEOUT)