You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
[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>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
581c1b1439
commit
6ede2463c8
+6
-6
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user