summaryrefslogtreecommitdiffstats
path: root/kernel/linux/net/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/linux/net/bridge')
-rw-r--r--kernel/linux/net/bridge/Makefile4
-rw-r--r--kernel/linux/net/bridge/br.c17
-rw-r--r--kernel/linux/net/bridge/br_input.c13
3 files changed, 6 insertions, 28 deletions
diff --git a/kernel/linux/net/bridge/Makefile b/kernel/linux/net/bridge/Makefile
index 77ed459..37e4464 100644
--- a/kernel/linux/net/bridge/Makefile
+++ b/kernel/linux/net/bridge/Makefile
@@ -7,11 +7,7 @@
#
# Note 2! The CFLAGS definition is now in the main makefile...
-ifneq ($(CONFIG_BRIDGE_EBT_BROUTE),n)
-ifneq ($(CONFIG_BRIDGE_EBT_BROUTE),)
export-objs := br.o
-endif
-endif
O_TARGET := bridge.o
obj-y := br.o br_device.o br_fdb.o br_forward.o br_if.o br_input.o \
diff --git a/kernel/linux/net/bridge/br.c b/kernel/linux/net/bridge/br.c
index c1fc9da..1c7b938 100644
--- a/kernel/linux/net/bridge/br.c
+++ b/kernel/linux/net/bridge/br.c
@@ -5,7 +5,7 @@
* Authors:
* Lennert Buytenhek <buytenh@gnu.org>
*
- * $Id: br.c,v 1.3 2002/08/29 21:23:19 bdschuym Exp $
+ * $Id: br.c,v 1.4 2002/09/16 21:10:43 bdschuym Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -28,13 +28,7 @@
#include "../atm/lec.h"
#endif
-#if defined(CONFIG_BRIDGE_EBT_BROUTE) || \
- defined(CONFIG_BRIDGE_EBT_BROUTE_MODULE)
-unsigned int (*broute_decision) (unsigned int hook, struct sk_buff **pskb,
- const struct net_device *in,
- const struct net_device *out,
- int (*okfn)(struct sk_buff *)) = NULL;
-#endif
+int (*br_should_route_hook) (struct sk_buff **pskb) = NULL;
void br_dec_use_count()
{
@@ -82,12 +76,7 @@ static void __exit br_deinit(void)
#endif
}
-#if defined(CONFIG_BRIDGE_EBT_BROUTE) || \
- defined(CONFIG_BRIDGE_EBT_BROUTE_MODULE)
-EXPORT_SYMBOL(broute_decision);
-#else
-EXPORT_NO_SYMBOLS;
-#endif
+EXPORT_SYMBOL(br_should_route_hook);
module_init(br_init)
module_exit(br_deinit)
diff --git a/kernel/linux/net/bridge/br_input.c b/kernel/linux/net/bridge/br_input.c
index 501975b..ffd8ccf 100644
--- a/kernel/linux/net/bridge/br_input.c
+++ b/kernel/linux/net/bridge/br_input.c
@@ -5,7 +5,7 @@
* Authors:
* Lennert Buytenhek <buytenh@gnu.org>
*
- * $Id: br_input.c,v 1.5 2002/09/10 17:33:26 bdschuym Exp $
+ * $Id: br_input.c,v 1.6 2002/09/16 21:06:14 bdschuym Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -19,10 +19,6 @@
#include <linux/if_bridge.h>
#include <linux/netfilter_bridge.h>
#include "br_private.h"
-#if defined(CONFIG_BRIDGE_EBT_BROUTE) || \
- defined(CONFIG_BRIDGE_EBT_BROUTE_MODULE)
-#include <linux/netfilter.h>
-#endif
unsigned char bridge_ula[6] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 };
@@ -153,12 +149,9 @@ int br_handle_frame(struct sk_buff *skb)
goto handle_special_frame;
if (p->state == BR_STATE_FORWARDING) {
-#if defined(CONFIG_BRIDGE_EBT_BROUTE) || \
- defined(CONFIG_BRIDGE_EBT_BROUTE_MODULE)
- if (broute_decision && broute_decision(NF_BR_BROUTING, &skb,
- skb->dev, NULL, NULL) == NF_DROP)
+ if (br_should_route_hook && br_should_route_hook(&skb))
return -1;
-#endif
+
NF_HOOK(PF_BRIDGE, NF_BR_PRE_ROUTING, skb, skb->dev, NULL,
br_handle_frame_finish);
read_unlock(&br->lock);