aboutsummaryrefslogtreecommitdiff
path: root/net/atm/lec.c
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2009-06-05 05:35:28 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-11 21:03:21 -0700
commitda6782927de809d9d427bd4bd6a4024243e41f13 (patch)
tree79419b352017a0c125c2b17e6a170589b31d8cb3 /net/atm/lec.c
parent746e6ad23cd6fec2edce056e014a0eabeffa838c (diff)
bridge: Simplify interface for ATM LANE
This patch changes FDB entry check for ATM LANE bridge integration. There's no point in holding a FDB entry around SKB building. br_fdb_get()/br_fdb_put() pair are changed into single br_fdb_test_addr() hook that checks if the addr has FDB entry pointing to other port to the one the request arrived on. FDB entry refcounting is removed as it's not used anywhere else. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Acked-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/atm/lec.c')
-rw-r--r--net/atm/lec.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c
index 199b6bb79f4..75b9d59553f 100644
--- a/net/atm/lec.c
+++ b/net/atm/lec.c
@@ -34,7 +34,6 @@
/* Proxy LEC knows about bridging */
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
-#include <linux/if_bridge.h>
#include "../bridge/br_private.h"
static unsigned char bridge_ula_lec[] = { 0x01, 0x80, 0xc2, 0x00, 0x00 };
@@ -518,18 +517,14 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
case l_should_bridge:
#if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
{
- struct net_bridge_fdb_entry *f;
-
pr_debug("%s: bridge zeppelin asks about %pM\n",
dev->name, mesg->content.proxy.mac_addr);
- if (br_fdb_get_hook == NULL || dev->br_port == NULL)
+ if (br_fdb_test_addr_hook == NULL)
break;
- f = br_fdb_get_hook(dev->br_port->br,
- mesg->content.proxy.mac_addr);
- if (f != NULL && f->dst->dev != dev
- && f->dst->state == BR_STATE_FORWARDING) {
+ if (br_fdb_test_addr_hook(dev,
+ mesg->content.proxy.mac_addr)) {
/* hit from bridge table, send LE_ARP_RESPONSE */
struct sk_buff *skb2;
struct sock *sk;
@@ -540,10 +535,8 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
skb2 =
alloc_skb(sizeof(struct atmlec_msg),
GFP_ATOMIC);
- if (skb2 == NULL) {
- br_fdb_put_hook(f);
+ if (skb2 == NULL)
break;
- }
skb2->len = sizeof(struct atmlec_msg);
skb_copy_to_linear_data(skb2, mesg,
sizeof(*mesg));
@@ -552,8 +545,6 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb)
skb_queue_tail(&sk->sk_receive_queue, skb2);
sk->sk_data_ready(sk, skb2->len);
}
- if (f != NULL)
- br_fdb_put_hook(f);
}
#endif /* defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE) */
break;