aboutsummaryrefslogtreecommitdiff
path: root/net/bridge/br_fdb.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-10-25 15:04:59 -0700
committerArnaldo Carvalho de Melo <acme@mandriva.com>2005-10-31 16:34:10 -0200
commit6ede2463c8d7ea949f8e7ef35243490c415ddc2f (patch)
tree161ec1e8ec68dfd48b80706a08f253bb48e9c3cf /net/bridge/br_fdb.c
parent581c1b14394aee60aff46ea67d05483261ed6527 (diff)
[BRIDGE]: Use ether_compare
Use compare_ether_addr in bridge code. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com>
Diffstat (limited to 'net/bridge/br_fdb.c')
-rw-r--r--net/bridge/br_fdb.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 24396b914d1..1f08a59b51e 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -86,8 +86,8 @@ void br_fdb_changeaddr(struct net_bridge_port *p, const unsigned char *newaddr)
struct net_bridge_port *op;
list_for_each_entry(op, &br->port_list, list) {
if (op != p &&
- !memcmp(op->dev->dev_addr,
- f->addr.addr, ETH_ALEN)) {
+ !compare_ether_addr(op->dev->dev_addr,
+ f->addr.addr)) {
f->dst = op;
goto insert;
}
@@ -151,8 +151,8 @@ void br_fdb_delete_by_port(struct net_bridge *br, struct net_bridge_port *p)
struct net_bridge_port *op;
list_for_each_entry(op, &br->port_list, list) {
if (op != p &&
- !memcmp(op->dev->dev_addr,
- f->addr.addr, ETH_ALEN)) {
+ !compare_ether_addr(op->dev->dev_addr,
+ f->addr.addr)) {
f->dst = op;
goto skip_delete;
}
@@ -174,7 +174,7 @@ struct net_bridge_fdb_entry *__br_fdb_get(struct net_bridge *br,
struct net_bridge_fdb_entry *fdb;
hlist_for_each_entry_rcu(fdb, h, &br->hash[br_mac_hash(addr)], hlist) {
- if (!memcmp(fdb->addr.addr, addr, ETH_ALEN)) {
+ if (!compare_ether_addr(fdb->addr.addr, addr)) {
if (unlikely(has_expired(br, fdb)))
break;
return fdb;
@@ -264,7 +264,7 @@ static inline struct net_bridge_fdb_entry *fdb_find(struct hlist_head *head,
struct net_bridge_fdb_entry *fdb;
hlist_for_each_entry_rcu(fdb, h, head, hlist) {
- if (!memcmp(fdb->addr.addr, addr, ETH_ALEN))
+ if (!compare_ether_addr(fdb->addr.addr, addr))
return fdb;
}
return NULL;