diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2005-10-25 15:04:59 -0700 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@mandriva.com> | 2005-10-31 16:34:10 -0200 |
commit | 6ede2463c8d7ea949f8e7ef35243490c415ddc2f (patch) | |
tree | 161ec1e8ec68dfd48b80706a08f253bb48e9c3cf /net/bridge/br_stp_if.c | |
parent | 581c1b14394aee60aff46ea67d05483261ed6527 (diff) | |
download | op-kernel-dev-6ede2463c8d7ea949f8e7ef35243490c415ddc2f.zip op-kernel-dev-6ede2463c8d7ea949f8e7ef35243490c415ddc2f.tar.gz |
[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_stp_if.c')
-rw-r--r-- | net/bridge/br_stp_if.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/bridge/br_stp_if.c b/net/bridge/br_stp_if.c index 0da11ff..ac09b6a 100644 --- a/net/bridge/br_stp_if.c +++ b/net/bridge/br_stp_if.c @@ -15,6 +15,7 @@ #include <linux/kernel.h> #include <linux/smp_lock.h> +#include <linux/etherdevice.h> #include "br_private.h" #include "br_private_stp.h" @@ -133,10 +134,10 @@ static void br_stp_change_bridge_id(struct net_bridge *br, memcpy(br->dev->dev_addr, addr, ETH_ALEN); list_for_each_entry(p, &br->port_list, list) { - if (!memcmp(p->designated_bridge.addr, oldaddr, ETH_ALEN)) + if (!compare_ether_addr(p->designated_bridge.addr, oldaddr)) memcpy(p->designated_bridge.addr, addr, ETH_ALEN); - if (!memcmp(p->designated_root.addr, oldaddr, ETH_ALEN)) + if (!compare_ether_addr(p->designated_root.addr, oldaddr)) memcpy(p->designated_root.addr, addr, ETH_ALEN); } @@ -157,12 +158,12 @@ void br_stp_recalculate_bridge_id(struct net_bridge *br) list_for_each_entry(p, &br->port_list, list) { if (addr == br_mac_zero || - memcmp(p->dev->dev_addr, addr, ETH_ALEN) < 0) + compare_ether_addr(p->dev->dev_addr, addr) < 0) addr = p->dev->dev_addr; } - if (memcmp(br->bridge_id.addr, addr, ETH_ALEN)) + if (compare_ether_addr(br->bridge_id.addr, addr)) br_stp_change_bridge_id(br, addr); } |