bridge: Fix redefined references
Subsystems (3)
PATCH 1/1 bridge: Fix redefined references
Commit 34666d467cbf1e2e3 ("netfilter: bridge: move br_netfilter out of the core") cause compiler errors when CONFIG_BRIDGE_NETFILTER is not defined.
net/bridge/br_nf_core.c:77:1: error: expected identifier or '(' before '{' token net/bridge/br_nf_core.c:88:115: error: redefinition of 'br_nf_core_init' In file included from net/bridge/br_nf_core.c:23:0:net/bridge/br_private.h:762:59: note: previous definition of 'br_nf_core_init' was here net/bridge/br_nf_core.c:93:6: error: redefinition of 'br_nf_core_fini'
In file included from net/bridge/br_nf_core.c:23:0:net/bridge/br_private.h:763:60: note: previous definition of 'br_nf_core_fini' was here
Add #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER) around definitions of the redefined functions.
--- net/bridge/br_nf_core.c | 2 ++ 1 file changed, 2 insertions(+)
net/bridge/br_nf_core.c +2 -0
@@ -73,6 +73,7 @@ static const u32 br_dst_default_metrics[RTAX_MAX] = { [RTAX_MTU - 1] = 1500, }; +#if IS_ENABLED (CONFIG_BRIDGE_NETFILTER )void br_netfilter_rtable_init (struct net_bridge *br) {struct rtable *rt = &br->fake_rtable;
@@ -94,3 +95,4 @@ void br_nf_core_fini(void) {dst_entries_destroy (&fake_dst_ops); } +#endif
Signature · 1 line
2.1.0.rc2.206.gedb03e5
David Miller
maintainerFrom: Tom Herbert <[email protected]>
Date: Mon, 29 Sep 2014 19:16:44 -0700
Quoted 12 lines
Commit
34666d467cbf1e2e3("netfilter: bridge: movebr_netfilterout of the core") cause compiler errors whenCONFIG_BRIDGE_NETFILTERis not defined.
net/bridge/br_nf_core.c:77:1: error: expected identifier or '(' before '{' tokennet/bridge/br_nf_core.c:88:115: error: redefinition of 'br_nf_core_init' In file included fromnet/bridge/br_nf_core.c:23:0:net/bridge/br_private.h:762:59: note: previous definition of 'br_nf_core_init' was herenet/bridge/br_nf_core.c:93:6: error: redefinition of 'br_nf_core_fini'
In file included fromnet/bridge/br_nf_core.c:23:0:net/bridge/br_private.h:763:60: note: previous definition of 'br_nf_core_fini' was here
Quoted 4 lines
Add #if
IS_ENABLED(CONFIG_BRIDGE_NETFILTER)around definitions of the redefined functions.Signed-off-by Tom Herbert <[email protected]>
Pablo please either ACK this or provide an alternative fix ASAP.
This bridging build breakage is impacting a lot of people.
Quoted 15 lines · David Miller
From: Tom Herbert <[email protected]>
Date: Mon, 29 Sep 2014 19:16:44 -0700Quoted 12 lines
Commit
34666d467cbf1e2e3("netfilter: bridge: movebr_netfilterout of the core") cause compiler errors whenCONFIG_BRIDGE_NETFILTERis not defined.
net/bridge/br_nf_core.c:77:1: error: expected identifier or '(' before '{' tokennet/bridge/br_nf_core.c:88:115: error: redefinition of 'br_nf_core_init' In file included fromnet/bridge/br_nf_core.c:23:0:net/bridge/br_private.h:762:59: note: previous definition of 'br_nf_core_init' was herenet/bridge/br_nf_core.c:93:6: error: redefinition of 'br_nf_core_fini'
In file included fromnet/bridge/br_nf_core.c:23:0:net/bridge/br_private.h:763:60: note: previous definition of 'br_nf_core_fini' was here
Quoted 8 lines
Quoted 4 lines
Add #if
IS_ENABLED(CONFIG_BRIDGE_NETFILTER)around definitions of the redefined functions.Signed-off-by Tom Herbert <[email protected]>Pablo please either ACK this or provide an alternative fix ASAP.
This bridging build breakage is impacting a lot of people.
Sorry for the trouble this is causing.
I just sent a patch from Florian to resolve the compilataion breakage when CONFIG_BRIDGE_NETFILTER=n.
Thanks.