linux/net/ipv6/netfilter
Pablo Neira Ayuso 6eda0d771f netfilter: nat: use kfree_rcu to release ops
Florian Westphal says:

"Historically this is not an issue, even for normal base hooks: the data
path doesn't use the original nf_hook_ops that are used to register the
callbacks.

However, in v5.14 I added the ability to dump the active netfilter
hooks from userspace.

This code will peek back into the nf_hook_ops that are available
at the tail of the pointer-array blob used by the datapath.

The nat hooks are special, because they are called indirectly from
the central nat dispatcher hook. They are currently invisible to
the nfnl hook dump subsystem though.

But once that changes the nat ops structures have to be deferred too."

Update nf_nat_register_fn() to deal with partial exposition of the hooks
from error path which can be also an issue for nfnetlink_hook.

Fixes: e2cf17d377 ("netfilter: add new hook nfnl subsystem")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2026-04-20 23:45:41 +02:00
..
Kconfig netfilter: add back NETFILTER_XTABLES dependencies 2025-08-07 13:19:25 +02:00
Makefile
ip6_tables.c netfilter: nf_dup{4, 6}: Move duplication check to task_struct 2025-05-23 13:57:12 +02:00
ip6t_NPT.c
ip6t_REJECT.c
ip6t_SYNPROXY.c
ip6t_ah.c
ip6t_eui64.c netfilter: require Ethernet MAC header before using eth_hdr() 2026-04-10 12:16:27 +02:00
ip6t_frag.c
ip6t_hbh.c
ip6t_ipv6header.c
ip6t_mh.c
ip6t_rpfilter.c
ip6t_rt.c netfilter: ip6t_rt: reject oversized addrnr in rt_mt6_check() 2026-03-26 13:18:31 +01:00
ip6t_srh.c
ip6table_filter.c
ip6table_mangle.c
ip6table_nat.c netfilter: nat: use kfree_rcu to release ops 2026-04-20 23:45:41 +02:00
ip6table_raw.c
ip6table_security.c
nf_conntrack_reasm.c treewide, timers: Rename from_timer() to timer_container_of() 2025-06-08 09:07:37 +02:00
nf_defrag_ipv6_hooks.c
nf_dup_ipv6.c ipv6: adopt dst_dev() helper 2025-07-02 14:32:30 -07:00
nf_reject_ipv6.c netfilter: nf_reject: don't reply to icmp error messages 2025-09-11 15:40:55 +02:00
nf_socket_ipv6.c tcp: Don't pass hashinfo to socket lookup helpers. 2025-08-25 17:53:35 -07:00
nf_tproxy_ipv6.c tcp: Don't pass hashinfo to socket lookup helpers. 2025-08-25 17:53:35 -07:00
nft_dup_ipv6.c netfilter: nf_tables: remove register tracking infrastructure 2026-02-25 19:36:26 -08:00
nft_fib_ipv6.c netfilter: nft_fib_ipv6: switch to fib6_lookup 2026-03-04 11:45:44 +01:00
nft_reject_ipv6.c netfilter: nf_tables: remove register tracking infrastructure 2026-02-25 19:36:26 -08:00