Skip to content
Snippets Groups Projects
Commit b37eb452 authored by Norihiko Hama's avatar Norihiko Hama Committed by Treehugger Robot
Browse files

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: default avatarNorihiko Hama <Norihiko.Hama@alpsalpine.com>
parent 40227c7a
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment