summaryrefslogtreecommitdiffstats
path: root/br-nf-bds/linux/net/bridge
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2002-09-17 21:39:55 +0000
committerBart De Schuymer <bdschuym@pandora.be>2002-09-17 21:39:55 +0000
commitc4c753d456e59ebbef673394c65231c8b85fb292 (patch)
tree86768efcf644df7fecc1e0798fe1edbb057063a7 /br-nf-bds/linux/net/bridge
parent78c4a2cb95676732bf99f47933be0a1eaea29089 (diff)
*** empty log message ***
Diffstat (limited to 'br-nf-bds/linux/net/bridge')
-rw-r--r--br-nf-bds/linux/net/bridge/br.c22
-rw-r--r--br-nf-bds/linux/net/bridge/br_forward.c2
-rw-r--r--br-nf-bds/linux/net/bridge/br_input.c13
3 files changed, 7 insertions, 30 deletions
diff --git a/br-nf-bds/linux/net/bridge/br.c b/br-nf-bds/linux/net/bridge/br.c
index 2109a5d..8fbde85 100644
--- a/br-nf-bds/linux/net/bridge/br.c
+++ b/br-nf-bds/linux/net/bridge/br.c
@@ -5,7 +5,7 @@
* Authors:
* Lennert Buytenhek <buytenh@gnu.org>
*
- * $Id: br.c,v 1.2 2002/08/24 08:44:40 bdschuym Exp $
+ * $Id: br.c,v 1.3 2002/09/17 21:42:06 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()
{
@@ -50,11 +44,8 @@ static int __init br_init(void)
{
printk(KERN_INFO "NET4: Ethernet Bridge 008 for NET4.0\n");
-#ifdef CONFIG_BRIDGE_NF
if (br_netfilter_init())
return 1;
-#endif
-
br_handle_frame_hook = br_handle_frame;
br_ioctl_hook = br_ioctl_deviceless_stub;
#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
@@ -78,9 +69,7 @@ static void __br_clear_ioctl_hook(void)
static void __exit br_deinit(void)
{
-#ifdef CONFIG_BRIDGE_NF
br_netfilter_fini();
-#endif
unregister_netdevice_notifier(&br_device_notifier);
br_call_ioctl_atomic(__br_clear_ioctl_hook);
net_call_rx_atomic(__br_clear_frame_hook);
@@ -90,12 +79,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/br-nf-bds/linux/net/bridge/br_forward.c b/br-nf-bds/linux/net/bridge/br_forward.c
index 0780d63..6f38e7e 100644
--- a/br-nf-bds/linux/net/bridge/br_forward.c
+++ b/br-nf-bds/linux/net/bridge/br_forward.c
@@ -5,7 +5,7 @@
* Authors:
* Lennert Buytenhek <buytenh@gnu.org>
*
- * $Id: br_forward.c,v 1.3 2002/09/10 17:38:52 bdschuym Exp $
+ * $Id: br_forward.c,v 1.4 2002/09/17 21:44:16 bdschuym Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
diff --git a/br-nf-bds/linux/net/bridge/br_input.c b/br-nf-bds/linux/net/bridge/br_input.c
index 5a506de..6d9f5c0 100644
--- a/br-nf-bds/linux/net/bridge/br_input.c
+++ b/br-nf-bds/linux/net/bridge/br_input.c
@@ -5,7 +5,7 @@
* Authors:
* Lennert Buytenhek <buytenh@gnu.org>
*
- * $Id: br_input.c,v 1.3 2002/09/10 17:35:52 bdschuym Exp $
+ * $Id: br_input.c,v 1.4 2002/09/17 21:44:59 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);