netfilter: ctnetlink: add timeout and protoinfo to destroy events
authorFlorian Westphal <fw@strlen.de>
Thu, 10 Dec 2020 13:43:23 +0000 (14:43 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Sat, 12 Dec 2020 10:44:42 +0000 (11:44 +0100)
commit86d21fc7474563cb5d054ff001d8ad7b69206717
tree764484f42898dea88f33e2063f6dd23b383deaa4
parent04295878beac396dae47ba93141cae0d9386e7ef
netfilter: ctnetlink: add timeout and protoinfo to destroy events

DESTROY events do not include the remaining timeout.

Add the timeout if the entry was removed explicitly. This can happen
when a conntrack gets deleted prematurely, e.g. due to a tcp reset,
module removal, netdev notifier (nat/masquerade device went down),
ctnetlink and so on.

Add the protocol state too for the destroy message to check for abnormal
state on connection termination.

Joint work with Pablo.

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/netfilter/nf_conntrack_netlink.c
net/netfilter/nf_conntrack_proto_dccp.c
net/netfilter/nf_conntrack_proto_sctp.c
net/netfilter/nf_conntrack_proto_tcp.c