Skip to content

Commit

Permalink
netfilter: nf_defrag_ipv6: solve section mismatch in nf_conntrack_reasm
Browse files Browse the repository at this point in the history
WARNING: net/ipv6/netfilter/nf_defrag_ipv6.o(.text+0xe0): Section mismatch in
reference from the function nf_ct_net_init() to the function
.init.text:nf_ct_frag6_sysctl_register()
The function nf_ct_net_init() references the function
__init nf_ct_frag6_sysctl_register().

In case nf_conntrack_ipv6 is compiled as a module, nf_ct_net_init could be
called after the init code and data are unloaded. Therefore remove the
"__net_init" annotation from nf_ct_frag6_sysctl_register().

Signed-off-by: Hein Tibosch <hein_tibosch@yahoo.es>
Acked-by: Cong Wang <amwang@redhat.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
  • Loading branch information
Hein Tibosch authored and Pablo Neira Ayuso committed Oct 28, 2012
1 parent 38fe36a commit f1df137
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/ipv6/netfilter/nf_conntrack_reasm.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static struct ctl_table nf_ct_frag6_sysctl_table[] = {
{ }
};

static int __net_init nf_ct_frag6_sysctl_register(struct net *net)
static int nf_ct_frag6_sysctl_register(struct net *net)
{
struct ctl_table *table;
struct ctl_table_header *hdr;
Expand Down Expand Up @@ -127,7 +127,7 @@ static void __net_exit nf_ct_frags6_sysctl_unregister(struct net *net)
}

#else
static int __net_init nf_ct_frag6_sysctl_register(struct net *net)
static int nf_ct_frag6_sysctl_register(struct net *net)
{
return 0;
}
Expand Down

0 comments on commit f1df137

Please sign in to comment.