From: pablo@netfilter.org
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH 4/7] netfilter: nf_ct_tcp: extend log message for invalid ignored packets
Date: Thu, 17 May 2012 01:06:41 +0200 [thread overview]
Message-ID: <1337209604-3412-5-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1337209604-3412-1-git-send-email-pablo@netfilter.org>
From: Pablo Neira Ayuso <pablo@netfilter.org>
Extend log message if packets are ignored to include the TCP state, ie.
replace:
[ 3968.070196] nf_ct_tcp: invalid packet ignored IN= OUT= SRC=...
by:
[ 3968.070196] nf_ct_tcp: invalid packet ignored in state ESTABLISHED IN= OUT= SRC=...
This information is useful to know in what state we were while ignoring the
packet.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
---
net/netfilter/nf_conntrack_proto_tcp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/netfilter/nf_conntrack_proto_tcp.c b/net/netfilter/nf_conntrack_proto_tcp.c
index 4dfbfa8..21ff1a9 100644
--- a/net/netfilter/nf_conntrack_proto_tcp.c
+++ b/net/netfilter/nf_conntrack_proto_tcp.c
@@ -952,7 +952,8 @@ static int tcp_packet(struct nf_conn *ct,
spin_unlock_bh(&ct->lock);
if (LOG_INVALID(net, IPPROTO_TCP))
nf_log_packet(pf, 0, skb, NULL, NULL, NULL,
- "nf_ct_tcp: invalid packet ignored ");
+ "nf_ct_tcp: invalid packet ignored in "
+ "state %s ", tcp_conntrack_names[old_state]);
return NF_ACCEPT;
case TCP_CONNTRACK_MAX:
/* Invalid packet */
--
1.7.10
next prev parent reply other threads:[~2012-05-16 23:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 23:06 [PATCH 0/7] netfilter updates for net-next (batch 3) pablo
2012-05-16 23:06 ` [PATCH 1/7] netfilter: xt_hashlimit: use _ALL macro to reject unknown flag bits pablo
2012-05-16 23:06 ` [PATCH 2/7] netfilter: xt_HMARK: potential NULL dereference in get_inner_hdr() pablo
2012-05-16 23:06 ` [PATCH 3/7] netfilter: xt_HMARK: modulus is expensive for hash calculation pablo
2012-05-17 8:16 ` David Laight
2012-05-17 8:39 ` Eric Dumazet
2012-05-17 14:55 ` Pablo Neira Ayuso
2012-05-16 23:06 ` pablo [this message]
2012-05-16 23:06 ` [PATCH 5/7] netfilter: ipset: fix timeout value overflow bug pablo
2012-05-16 23:06 ` [PATCH 6/7] netfilter: xt_CT: remove redundant header include pablo
2012-05-16 23:06 ` [PATCH 7/7] netfilter: nf_ct_h323: fix usage of MODULE_ALIAS_NFCT_HELPER pablo
2012-05-17 0:00 ` [PATCH 0/7] netfilter updates for net-next (batch 3) 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=1337209604-3412-5-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).