ANDROID: KMI workaround for CONFIG_NETFILTER_FAMILY_BRIDGE
Enabling CONFIG_NETFILTER_FAMILY_BRIDGE causes the new element,
hooks_bridge[] to be added to netns_nf. Since the KMI is frozen
this could not be added.
The only instantiation of struct netns_nf is as an embedded field
of struct net. So instead of adding the field to struct netns_nf,
a new "struct ext_net" is added that contains struct net and
the new hooks_bridge[] field. An accessor function,
get_nf_hooks_bridge() is added to get a pointer to the new
field.
There is a global init_net of type struct net which must be special
cased since it is not a member of a struct ext_net. All other
instances of struct net are allocated via net_alloc() which now
allocates a struct ext_net.
Since CONFIG_NETFILTER_FAMILY_BRIDGE is a hidden config that is
needed for vendor modules, it is enabled via init/Kconfig.gki.
Bug: 316040984
Change-Id: I2c7384e3df9b88f12464dc0138986fed12ca626a
Signed-off-by:
Norihiko Hama <Norihiko.Hama@alpsalpine.com>
Showing
- include/linux/netfilter.h 1 addition, 1 deletioninclude/linux/netfilter.h
- include/net/net_namespace.h 30 additions, 0 deletionsinclude/net/net_namespace.h
- include/net/netns/netfilter.h 0 additions, 3 deletionsinclude/net/netns/netfilter.h
- init/Kconfig.gki 1 addition, 0 deletionsinit/Kconfig.gki
- net/bridge/br_input.c 1 addition, 1 deletionnet/bridge/br_input.c
- net/bridge/br_netfilter_hooks.c 1 addition, 1 deletionnet/bridge/br_netfilter_hooks.c
- net/core/net_namespace.c 7 additions, 3 deletionsnet/core/net_namespace.c
- net/netfilter/core.c 9 additions, 3 deletionsnet/netfilter/core.c
- net/netfilter/nf_queue.c 1 addition, 1 deletionnet/netfilter/nf_queue.c
- net/netfilter/nfnetlink_hook.c 2 additions, 2 deletionsnet/netfilter/nfnetlink_hook.c
Loading
Please register or sign in to comment