summaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br.c19
-rw-r--r--net/bridge/br_input.c8
-rw-r--r--net/bridge/br_private.h4
3 files changed, 24 insertions, 7 deletions
diff --git a/net/bridge/br.c b/net/bridge/br.c
index ec59ff622..89ee1e0d5 100644
--- a/net/bridge/br.c
+++ b/net/bridge/br.c
@@ -5,7 +5,7 @@
* Authors:
* Lennert Buytenhek <buytenh@gnu.org>
*
- * $Id: br.c,v 1.39 2000/02/18 16:47:11 davem Exp $
+ * $Id: br.c,v 1.40 2000/03/21 21:08:47 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -13,6 +13,7 @@
* 2 of the License, or (at your option) any later version.
*/
+#include <linux/config.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
@@ -23,6 +24,10 @@
#include <asm/uaccess.h>
#include "br_private.h"
+#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
+#include "../atm/lec.h"
+#endif
+
void br_dec_use_count()
{
MOD_DEC_USE_COUNT;
@@ -39,6 +44,12 @@ static int __init br_init(void)
br_handle_frame_hook = br_handle_frame;
br_ioctl_hook = br_ioctl_deviceless_stub;
+#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
+ write_lock(&lane_bridge_hook_lock);
+ br_fdb_get_hook = br_fdb_get;
+ br_fdb_put_hook = br_fdb_put;
+ write_unlock(&lane_bridge_hook_lock);
+#endif
register_netdevice_notifier(&br_device_notifier);
return 0;
@@ -59,6 +70,12 @@ static void __exit br_deinit(void)
unregister_netdevice_notifier(&br_device_notifier);
br_call_ioctl_atomic(__br_clear_ioctl_hook);
net_call_rx_atomic(__br_clear_frame_hook);
+#if defined(CONFIG_ATM_LANE) || defined(CONFIG_ATM_LANE_MODULE)
+ write_lock(&lane_bridge_hook_lock);
+ br_fdb_get_hook = NULL;
+ br_fdb_put_hook = NULL;
+ write_unlock(&lane_bridge_hook_lock);
+#endif
}
EXPORT_NO_SYMBOLS;
diff --git a/net/bridge/br_input.c b/net/bridge/br_input.c
index e6fa6b379..fc549d76a 100644
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -5,7 +5,7 @@
* Authors:
* Lennert Buytenhek <buytenh@gnu.org>
*
- * $Id: br_input.c,v 1.3 2000/02/24 19:48:06 davem Exp $
+ * $Id: br_input.c,v 1.4 2000/03/21 21:08:47 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -19,7 +19,7 @@
#include <linux/if_bridge.h>
#include "br_private.h"
-unsigned char bridge_ula[5] = { 0x01, 0x80, 0xc2, 0x00, 0x00 };
+unsigned char bridge_ula[6] = { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x00 };
static void br_pass_frame_up(struct net_bridge *br, struct sk_buff *skb)
{
@@ -53,6 +53,8 @@ static void __br_handle_frame(struct sk_buff *skb)
p->state == BR_STATE_DISABLED)
goto freeandout;
+ skb_push(skb, skb->data - skb->mac.raw);
+
if (br->dev.flags & IFF_PROMISC) {
struct sk_buff *skb2;
@@ -81,8 +83,6 @@ static void __br_handle_frame(struct sk_buff *skb)
if (!memcmp(dest, bridge_ula, 5) && !(dest[5] & 0xF0))
goto handle_special_frame;
- skb_push(skb, skb->data - skb->mac.raw);
-
if (p->state == BR_STATE_LEARNING ||
p->state == BR_STATE_FORWARDING)
br_fdb_insert(br, p, skb->mac.ethernet->h_source, 0);
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 084e81b4b..76c14be9c 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -4,7 +4,7 @@
* Authors:
* Lennert Buytenhek <buytenh@gnu.org>
*
- * $Id: br_private.h,v 1.1 2000/02/18 16:47:12 davem Exp $
+ * $Id: br_private.h,v 1.2 2000/03/21 21:08:47 davem Exp $
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -114,7 +114,7 @@ struct net_bridge
};
struct notifier_block br_device_notifier;
-unsigned char bridge_ula[5];
+unsigned char bridge_ula[6];
/* br.c */
void br_dec_use_count(void);