Index: source.common/net/bridge/netfilter/ebtables.c
===================================================================
--- source.common/net/bridge/netfilter/ebtables.c	(revision 11165)
+++ source.common/net/bridge/netfilter/ebtables.c	(working copy)
@@ -2403,13 +2403,17 @@
 	}
 
 	printk(KERN_INFO "Ebtables v2.0 registered\n");
+#ifdef CONFIG_BRIDGE_NETFILTER
 	brnf_call_ebtables = 1;
+#endif
 	return 0;
 }
 
 static void __exit ebtables_fini(void)
 {
+#ifdef CONFIG_BRIDGE_NETFILTER
 	brnf_call_ebtables = 0;
+#endif
 	nf_unregister_sockopt(&ebt_sockopts);
 	xt_unregister_target(&ebt_standard_target);
 	printk(KERN_INFO "Ebtables v2.0 unregistered\n");
Index: source.common/net/bridge/br_private.h
===================================================================
--- source.common/net/bridge/br_private.h	(revision 11165)
+++ source.common/net/bridge/br_private.h	(working copy)
@@ -504,9 +504,10 @@
 	struct net_device *in, struct net_device *out,
 	int (*okfn)(struct sk_buff *))
 {
+#ifdef CONFIG_BRIDGE_NETFILTER
 	if (!br_netfilter_run_hooks())
 		return okfn(skb);
-
+#endif
 	return NF_HOOK(pf, hook, skb, in, out, okfn);
 }
 

