netfilter: nf_ct_helper: better logging for dropped packets
authorPablo Neira Ayuso <pablo@netfilter.org>
Sun, 10 Feb 2013 17:56:56 +0000 (18:56 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 19 Feb 2013 01:48:05 +0000 (02:48 +0100)
commitb20ab9cc63ca4605aec154cf54faa8455749f3f6
tree2948bf6e3ea7cd4e7b776895f1d059c15c3d914f
parent38124328fb3ea0b28451071bf3c7401e35c91020
netfilter: nf_ct_helper: better logging for dropped packets

Connection tracking helpers have to drop packets under exceptional
situations. Currently, the user gets the following logging message
in case that happens:

nf_ct_%s: dropping packet ...

However, depending on the helper, there are different reasons why a
packet can be dropped.

This patch modifies the existing code to provide more specific
error message in the scope of each helper to help users to debug
the reason why the packet has been dropped, ie:

nf_ct_%s: dropping packet: reason ...

Thanks to Joe Perches for many formatting suggestions.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
16 files changed:
include/net/netfilter/nf_conntrack_helper.h
net/ipv4/netfilter/nf_conntrack_l3proto_ipv4.c
net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c
net/netfilter/nf_conntrack_amanda.c
net/netfilter/nf_conntrack_ftp.c
net/netfilter/nf_conntrack_h323_main.c
net/netfilter/nf_conntrack_helper.c
net/netfilter/nf_conntrack_irc.c
net/netfilter/nf_conntrack_sane.c
net/netfilter/nf_conntrack_sip.c
net/netfilter/nf_conntrack_tftp.c
net/netfilter/nf_nat_amanda.c
net/netfilter/nf_nat_ftp.c
net/netfilter/nf_nat_irc.c
net/netfilter/nf_nat_sip.c
net/netfilter/nf_nat_tftp.c