From 5a26c697c0df5323c0dddeeb7d18f0e45f291168 Mon Sep 17 00:00:00 2001 From: Bart De Schuymer Date: Mon, 21 Oct 2002 17:32:51 +0000 Subject: update to 2.5.42 + add #ifdef CONFIG_NETFILTER --- br-nf-bds/linux2.5/net/bridge/br.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'br-nf-bds') diff --git a/br-nf-bds/linux2.5/net/bridge/br.c b/br-nf-bds/linux2.5/net/bridge/br.c index c119197..e335de2 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.2 2002/09/18 18:22:13 bdschuym Exp $ + * $Id: br.c,v 1.3 2002/10/21 17:32:51 bdschuym Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -21,6 +21,7 @@ #include #include #include +#include #include #include "br_private.h" @@ -44,8 +45,10 @@ static int __init br_init(void) { printk(KERN_INFO "NET4: Ethernet Bridge 008 for NET4.0\n"); +#ifdef CONFIG_NETFILTER 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) @@ -57,11 +60,6 @@ static int __init br_init(void) return 0; } -static void __br_clear_frame_hook(void) -{ - br_handle_frame_hook = NULL; -} - static void __br_clear_ioctl_hook(void) { br_ioctl_hook = NULL; @@ -69,10 +67,16 @@ static void __br_clear_ioctl_hook(void) static void __exit br_deinit(void) { +#ifdef CONFIG_NETFILTER 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); + + br_write_lock_bh(BR_NETPROTO_LOCK); + br_handle_frame_hook = NULL; + br_write_unlock_bh(BR_NETPROTO_LOCK); + #if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE) br_fdb_get_hook = NULL; br_fdb_put_hook = NULL; -- cgit v1.2.3