android_kernel_motorola_sm6375/net/bridge
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Florian Westphal ce23be37ec netfilter: bridge: add pre_exit hooks for ebtable unregistration
commit 7ee3c61dcd28bf6e290e06ad382f13511dc790e9 upstream.

Just like ip/ip6/arptables, the hooks have to be removed, then
synchronize_rcu() has to be called to make sure no more packets are being
processed before the ruleset data is released.

Place the hook unregistration in the pre_exit hook, then call the new
ebtables pre_exit function from there.

Years ago, when first netns support got added for netfilter+ebtables,
this used an older (now removed) netfilter hook unregister API, that did
a unconditional synchronize_rcu().

Now that all is done with call_rcu, ebtable_{filter,nat,broute} pernet exit
handlers may free the ebtable ruleset while packets are still in flight.

This can only happens on module removal, not during netns exit.

The new function expects the table name, not the table struct.

This is because upcoming patch set (targeting -next) will remove all
net->xt.{nat,filter,broute}_table instances, this makes it necessary
to avoid external references to those member variables.

The existing APIs will be converted, so follow the upcoming scheme of
passing name + hook type instead.

Fixes: aee12a0a37 ("ebtables: remove nf_hook_register usage")
Signed-off-by: Florian Westphal <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2021-04-21 12:56:16 +02:00
..
netfilter netfilter: bridge: add pre_exit hooks for ebtable unregistration 2021-04-21 12:56:16 +02:00
br.c net: bridge: Fix a warning when del bridge sysfs 2021-02-23 15:02:25 +01:00
br_arp_nd_proxy.c bridge: Avoid infinite loop when suppressing NS messages with invalid options 2020-06-17 16:40:20 +02:00
br_device.c bridge: Fix a deadlock when enabling multicast snooping 2020-12-21 13:27:04 +01:00
br_fdb.c
br_forward.c
br_if.c
br_input.c
br_ioctl.c
br_mdb.c
br_multicast.c bridge: Fix a deadlock when enabling multicast snooping 2020-12-21 13:27:04 +01:00
br_netfilter_hooks.c netfilter: bridge: reset skb->pkt_type after NF_INET_POST_ROUTING traversal 2020-12-08 10:40:24 +01:00
br_netfilter_ipv6.c
br_netlink.c
br_netlink_tunnel.c
br_nf_core.c net: add bool confirm_neigh parameter for dst_ops.update_pmtu 2020-01-04 19:18:58 +01:00
br_private.h bridge: Fix a deadlock when enabling multicast snooping 2020-12-21 13:27:04 +01:00
br_private_stp.h
br_private_tunnel.h
br_stp.c
br_stp_bpdu.c
br_stp_if.c
br_stp_timer.c
br_switchdev.c
br_sysfs_br.c
br_sysfs_if.c net: bridge: use switchdev for port flags set through sysfs too 2021-03-07 12:20:43 +01:00
br_vlan.c net: bridge: vlan: fix error return code in __vlan_add() 2020-12-21 13:27:03 +01:00
br_vlan_tunnel.c
Kconfig
Makefile