From 41426497d4a7630cf6044d5e90174b7243bd8215 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Wed, 18 Sep 2002 18:18:25 +0000 Subject: *** empty log message *** --- br-nf-bds/linux2.5/net/bridge/br.c | 20 +++----------------- br-nf-bds/linux2.5/net/bridge/br_forward.c | 6 +++--- br-nf-bds/linux2.5/net/bridge/br_input.c | 13 +++---------- br-nf-bds/linux2.5/net/bridge/br_private.h | 2 +- 4 files changed, 10 insertions(+), 31 deletions(-) (limited to 'br-nf-bds/linux2.5/net/bridge') diff --git a/br-nf-bds/linux2.5/net/bridge/br.c b/br-nf-bds/linux2.5/net/bridge/br.c index 30681c1..c119197 100644 --- a/br-nf-bds/linux2.5/net/bridge/br.c +++ b/br-nf-bds/linux2.5/net/bridge/br.c @@ -5,7 +5,7 @@ * Authors: * Lennert Buytenhek * - * $Id: br.c,v 1.1 2002/08/24 09:28:29 bdschuym Exp $ + * $Id: br.c,v 1.2 2002/09/18 18:22:13 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,10 +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); -#endif +EXPORT_SYMBOL(br_should_route_hook); module_init(br_init) module_exit(br_deinit) diff --git a/br-nf-bds/linux2.5/net/bridge/br_forward.c b/br-nf-bds/linux2.5/net/bridge/br_forward.c index a8cc91f..f16ad66 100644 --- a/br-nf-bds/linux2.5/net/bridge/br_forward.c +++ b/br-nf-bds/linux2.5/net/bridge/br_forward.c @@ -5,7 +5,7 @@ * Authors: * Lennert Buytenhek * - * $Id: br_forward.c,v 1.2 2002/09/10 17:38:19 bdschuym Exp $ + * $Id: br_forward.c,v 1.3 2002/09/18 18:24:19 bdschuym Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -30,7 +30,7 @@ static inline int should_deliver(struct net_bridge_port *p, struct sk_buff *skb) return 1; } -int br_dev_queue_push_xmit(struct sk_buff *skb) +int dev_queue_push_xmit(struct sk_buff *skb) { skb_push(skb, ETH_HLEN); dev_queue_xmit(skb); @@ -41,7 +41,7 @@ int br_dev_queue_push_xmit(struct sk_buff *skb) int br_forward_finish(struct sk_buff *skb) { NF_HOOK(PF_BRIDGE, NF_BR_POST_ROUTING, skb, NULL, skb->dev, - br_dev_queue_push_xmit); + dev_queue_push_xmit); return 0; } diff --git a/br-nf-bds/linux2.5/net/bridge/br_input.c b/br-nf-bds/linux2.5/net/bridge/br_input.c index bcfeada..2f15eb6 100644 --- a/br-nf-bds/linux2.5/net/bridge/br_input.c +++ b/br-nf-bds/linux2.5/net/bridge/br_input.c @@ -5,7 +5,7 @@ * Authors: * Lennert Buytenhek * - * $Id: br_input.c,v 1.2 2002/09/10 17:36:25 bdschuym Exp $ + * $Id: br_input.c,v 1.3 2002/09/18 18:26:47 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 #include #include "br_private.h" -#if defined(CONFIG_BRIDGE_EBT_BROUTE) || \ - defined(CONFIG_BRIDGE_EBT_BROUTE_MODULE) -#include -#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); diff --git a/br-nf-bds/linux2.5/net/bridge/br_private.h b/br-nf-bds/linux2.5/net/bridge/br_private.h index 4be0cfc..949c9c1 100644 --- a/br-nf-bds/linux2.5/net/bridge/br_private.h +++ b/br-nf-bds/linux2.5/net/bridge/br_private.h @@ -4,7 +4,7 @@ * Authors: * Lennert Buytenhek * - * $Id: br_private.h,v 1.2 2002/08/24 13:42:35 bdschuym Exp $ + * $Id: br_private.h,v 1.3 2002/09/18 18:28:48 bdschuym Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License -- cgit v1.2.3