Skip to contentSkip to conversation

netfilter: bridge: build br_nf_core only if required

PATCH Applied Pablo Neira Ayuso 2 participants 2 messages Sep 30, 2014

Subsystems (4)
lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 netfilter: bridge: build br_nf_core only if required

From: Florian Westphal <[email protected]>

Eric reports build failure with
CONFIG_BRIDGE_NETFILTER=n

We insist to build br_nf_core.o unconditionally, but we must only do so if br_netfilter was enabled, else it fails to build due to functions being defined to empty stubs (and some structure members being defined out).

Also, BRIDGE_NETFILTER=y|m makes no sense when BRIDGE=n.

Fixes 34666d467 (netfilter: bridge: move br_netfilter out of the core)
---
 net/Kconfig         |    2 +-
 net/bridge/Makefile |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)
net/Kconfig +1 -1
index dc5d700..d6b138e 100644
@@ -177,7 +177,7 @@ config NETFILTER_ADVANCED
 
 config BRIDGE_NETFILTER
 	tristate "Bridged IP/ARP packets filtering"
-	depends on (BRIDGE || BRIDGE=n)
+	depends on BRIDGE
 	depends on NETFILTER && INET
 	depends on NETFILTER_ADVANCED
 	default m
net/bridge/Makefile +3 -2
index 5e3eac5..fd7ee03 100644
@@ -6,11 +6,12 @@ obj-$(CONFIG_BRIDGE) += bridge.o
 
 bridge-y	:= br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o \
 			br_ioctl.o br_stp.o br_stp_bpdu.o \
-			br_stp_if.o br_stp_timer.o br_netlink.o \
-			br_nf_core.o
+			br_stp_if.o br_stp_timer.o br_netlink.o
 
 bridge-$(CONFIG_SYSFS) += br_sysfs_if.o br_sysfs_br.o
 
+bridge-$(subst m,y,$(CONFIG_BRIDGE_NETFILTER)) += br_nf_core.o
+
 obj-$(CONFIG_BRIDGE_NETFILTER) += br_netfilter.o
 
 bridge-$(CONFIG_BRIDGE_IGMP_SNOOPING) += br_multicast.o br_mdb.o
Signature · 1 line
1.7.10.4
maintainer Applied
#1 lore raw

From: Pablo Neira Ayuso <[email protected]>
Date: Tue, 30 Sep 2014 10:59:18 +0200

Quoted 10 lines

From: Florian Westphal <[email protected]>

Eric reports build failure with
CONFIG_BRIDGE_NETFILTER=n

We insist to build br_nf_core.o unconditionally, but we must only do so if br_netfilter was enabled, else it fails to build due to functions being defined to empty stubs (and some structure members being defined out).

Quoted 6 lines

Also, BRIDGE_NETFILTER=y|m makes no sense when BRIDGE=n.

Fixes 34666d467 (netfilter: bridge: move br_netfilter out of the core)

Applied, thanks.