summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2014-09-30 10:59:18 +0200
committerDavid S. Miller <davem@davemloft.net>2014-09-30 14:07:51 -0400
commit57f5877c11b244ff2315f4ba0e57b54fe013581f (patch)
tree7e122ae01871dcd51555f16ba9e8067f42bceec1
parent213d61386ee8a0a704d99922dbdb99f9c233d630 (diff)
netfilter: bridge: build br_nf_core only if required
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) Reported-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/Kconfig2
-rw-r--r--net/bridge/Makefile5
2 files changed, 4 insertions, 3 deletions
diff --git a/net/Kconfig b/net/Kconfig
index dc5d700d05e7..d6b138e2c263 100644
--- a/net/Kconfig
+++ b/net/Kconfig
@@ -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
diff --git a/net/bridge/Makefile b/net/bridge/Makefile
index 5e3eac5dc8b9..fd7ee03c59b3 100644
--- a/net/bridge/Makefile
+++ b/net/bridge/Makefile
@@ -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