Commit 57f5877c authored by Florian Westphal's avatar Florian Westphal Committed by David S. Miller

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: 34666d46 (netfilter: bridge: move br_netfilter out of the core)
Reported-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 213d6138
...@@ -177,7 +177,7 @@ config NETFILTER_ADVANCED ...@@ -177,7 +177,7 @@ config NETFILTER_ADVANCED
config BRIDGE_NETFILTER config BRIDGE_NETFILTER
tristate "Bridged IP/ARP packets filtering" tristate "Bridged IP/ARP packets filtering"
depends on (BRIDGE || BRIDGE=n) depends on BRIDGE
depends on NETFILTER && INET depends on NETFILTER && INET
depends on NETFILTER_ADVANCED depends on NETFILTER_ADVANCED
default m default m
......
...@@ -6,11 +6,12 @@ obj-$(CONFIG_BRIDGE) += bridge.o ...@@ -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 \ 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_ioctl.o br_stp.o br_stp_bpdu.o \
br_stp_if.o br_stp_timer.o br_netlink.o \ br_stp_if.o br_stp_timer.o br_netlink.o
br_nf_core.o
bridge-$(CONFIG_SYSFS) += br_sysfs_if.o br_sysfs_br.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 obj-$(CONFIG_BRIDGE_NETFILTER) += br_netfilter.o
bridge-$(CONFIG_BRIDGE_IGMP_SNOOPING) += br_multicast.o br_mdb.o bridge-$(CONFIG_BRIDGE_IGMP_SNOOPING) += br_multicast.o br_mdb.o
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment