diff options
author | Pablo Neira Ayuso | 2015-03-02 01:10:28 +0100 |
---|---|---|
committer | Pablo Neira Ayuso | 2015-03-19 11:14:48 +0100 |
commit | 4017a7ee693d1cae6735c0dac21594a7c6416c4c (patch) | |
tree | 1ff0e2930ba407497e9ed56839de227c9f3c5b33 /net/netfilter/nf_tables_core.c | |
parent | netfilter: nf_tables: allow to change chain policy without hook if it exists (diff) | |
download | kernel-qcow2-linux-4017a7ee693d1cae6735c0dac21594a7c6416c4c.tar.gz kernel-qcow2-linux-4017a7ee693d1cae6735c0dac21594a7c6416c4c.tar.xz kernel-qcow2-linux-4017a7ee693d1cae6735c0dac21594a7c6416c4c.zip |
netfilter: restore rule tracing via nfnetlink_log
Since fab4085 ("netfilter: log: nf_log_packet() as real unified
interface"), the loginfo structure that is passed to nf_log_packet() is
used to explicitly indicate the logger type you want to use.
This is a problem for people tracing rules through nfnetlink_log since
packets are always routed to the NF_LOG_TYPE logger after the
aforementioned patch.
We can fix this by removing the trace loginfo structures, but that still
changes the log level from 4 to 5 for tracing messages and there may be
someone relying on this outthere. So let's just introduce a new
nf_log_trace() function that restores the former behaviour.
Reported-by: Markus Kötter <koetter@rrzn.uni-hannover.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nf_tables_core.c')
-rw-r--r-- | net/netfilter/nf_tables_core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/netfilter/nf_tables_core.c b/net/netfilter/nf_tables_core.c index 3b90eb2b2c55..2d298dccb6dd 100644 --- a/net/netfilter/nf_tables_core.c +++ b/net/netfilter/nf_tables_core.c @@ -94,10 +94,10 @@ static void nft_trace_packet(const struct nft_pktinfo *pkt, { struct net *net = dev_net(pkt->in ? pkt->in : pkt->out); - nf_log_packet(net, pkt->xt.family, pkt->ops->hooknum, pkt->skb, pkt->in, - pkt->out, &trace_loginfo, "TRACE: %s:%s:%s:%u ", - chain->table->name, chain->name, comments[type], - rulenum); + nf_log_trace(net, pkt->xt.family, pkt->ops->hooknum, pkt->skb, pkt->in, + pkt->out, &trace_loginfo, "TRACE: %s:%s:%s:%u ", + chain->table->name, chain->name, comments[type], + rulenum); } unsigned int |