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>
Showing
- include/net/netfilter/nf_conntrack_l4proto.h 10 additions, 0 deletionsinclude/net/netfilter/nf_conntrack_l4proto.h
- net/ipv4/netfilter/nf_conntrack_proto_icmp.c 9 additions, 9 deletionsnet/ipv4/netfilter/nf_conntrack_proto_icmp.c
- net/ipv6/netfilter/nf_conntrack_proto_icmpv6.c 8 additions, 6 deletionsnet/ipv6/netfilter/nf_conntrack_proto_icmpv6.c
- net/netfilter/nf_conntrack_proto.c 24 additions, 0 deletionsnet/netfilter/nf_conntrack_proto.c
- net/netfilter/nf_conntrack_proto_dccp.c 1 addition, 2 deletionsnet/netfilter/nf_conntrack_proto_dccp.c
- net/netfilter/nf_conntrack_proto_sctp.c 1 addition, 2 deletionsnet/netfilter/nf_conntrack_proto_sctp.c
- net/netfilter/nf_conntrack_proto_tcp.c 10 additions, 12 deletionsnet/netfilter/nf_conntrack_proto_tcp.c
- net/netfilter/nf_conntrack_proto_udp.c 19 additions, 21 deletionsnet/netfilter/nf_conntrack_proto_udp.c
Loading
Please register or sign in to comment