]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
netfilter: conntrack: add and use nf_l4proto_log_invalid
authorFlorian Westphal <fw@strlen.de>
Wed, 11 Oct 2017 08:47:40 +0000 (10:47 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 24 Oct 2017 16:01:49 +0000 (18:01 +0200)
commitc4f3db15958277c03d1c324894255ea3ecbf86e1
tree0652feccc1b2ecc9040bc6a051a8c41e96d620db
parent2420770b3fe56ca97ecf34e230762cd9f3296dae
netfilter: conntrack: add and use nf_l4proto_log_invalid

We currently pass down the l4 protocol to the conntrack ->packet()
function, but the only user of this is the debug info decision.

Same information can be derived from struct nf_conn.
As a first step, add and use a new log function for this, similar to
nf_ct_helper_log().

Add __cold annotation -- invalid packets should be infrequent so
gcc can consider all call paths that lead to such a function as
unlikely.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nf_conntrack_l4proto.h
net/ipv4/netfilter/nf_conntrack_proto_icmp.c
net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
net/netfilter/nf_conntrack_proto.c
net/netfilter/nf_conntrack_proto_dccp.c
net/netfilter/nf_conntrack_proto_sctp.c
net/netfilter/nf_conntrack_proto_tcp.c
net/netfilter/nf_conntrack_proto_udp.c