WSL2-Linux-Kernel/net/ipv4/netfilter
Florian Westphal 339031bafe netfilter: conntrack: fix boot failure with nf_conntrack.enable_hooks=1
This is a revert of
7b1957b049 ("netfilter: nf_defrag_ipv4: use net_generic infra")
and a partial revert of
8b0adbe3e3 ("netfilter: nf_defrag_ipv6: use net_generic infra").

If conntrack is builtin and kernel is booted with:
nf_conntrack.enable_hooks=1

.... kernel will fail to boot due to a NULL deref in
nf_defrag_ipv4_enable(): Its called before the ipv4 defrag initcall is
made, so net_generic() returns NULL.

To resolve this, move the user refcount back to struct net so calls
to those functions are possible even before their initcalls have run.

Fixes: 7b1957b049 ("netfilter: nf_defrag_ipv4: use net_generic infra")
Fixes: 8b0adbe3e3 ("netfilter: nf_defrag_ipv6: use net_generic infra").
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
2021-09-28 13:04:55 +02:00
..
Kconfig netfilter: nf_log_arp: merge with nf_log_syslog 2021-03-31 00:37:27 +02:00
Makefile netfilter: nf_log_arp: merge with nf_log_syslog 2021-03-31 00:37:27 +02:00
arp_tables.c netfilter: arptables: use pernet ops struct during unregister 2021-05-03 23:04:01 +02:00
arpt_mangle.c
arptable_filter.c netfilter: x_tables: never register tables by default 2021-08-09 10:22:01 +02:00
ip_tables.c netfilter: allow to turn off xtables compat layer 2021-04-26 18:16:56 +02:00
ipt_CLUSTERIP.c netfilter: ipt_CLUSTERIP: use clusterip_net to store pernet warning 2021-08-01 12:00:50 +02:00
ipt_ECN.c
ipt_REJECT.c
ipt_SYNPROXY.c
ipt_ah.c
ipt_rpfilter.c netfilter: rpfilter: mask ecn bits before fib lookup 2021-01-19 13:54:30 -08:00
iptable_filter.c netfilter: x_tables: never register tables by default 2021-08-09 10:22:01 +02:00
iptable_mangle.c netfilter: x_tables: handle xt_register_template() returning an error value 2021-08-25 13:06:48 +02:00
iptable_nat.c netfilter: x_tables: never register tables by default 2021-08-09 10:22:01 +02:00
iptable_raw.c netfilter: iptable_raw: drop bogus net_init annotation 2021-09-21 03:46:56 +02:00
iptable_security.c netfilter: x_tables: never register tables by default 2021-08-09 10:22:01 +02:00
nf_defrag_ipv4.c netfilter: conntrack: fix boot failure with nf_conntrack.enable_hooks=1 2021-09-28 13:04:55 +02:00
nf_dup_ipv4.c
nf_flow_table_ipv4.c
nf_nat_h323.c
nf_nat_pptp.c
nf_nat_snmp_basic.asn1
nf_nat_snmp_basic_main.c
nf_reject_ipv4.c
nf_socket_ipv4.c
nf_tproxy_ipv4.c
nft_dup_ipv4.c netfilter: nftables: add nft_parse_register_load() and use it 2021-01-27 22:53:29 +01:00
nft_fib_ipv4.c
nft_reject_ipv4.c netfilter: nf_tables: add and use nft_sk helper 2021-05-29 01:04:53 +02:00