(sorry for the late reply... :( )
On Thu, Nov 08, 2001 at 03:27:59AM -0500, Brenk, Rudger van wrote:
> I will explain:
> The embedded linux WLAN Access Point we are building has got one MAC
> address. In linux we use normally to devices eth0 (wired port) and eth1
> (wireless port). In some special configuration we need a dummy device on
> the wireless port to make it possible for the AP to link to an other AP
> (wireless distibution system). These dummy devices can't have it's own
> MAC address (it dynamic), this is the reason why we use ONE mac address!
OK, that makes sense.
> > I'd much rather move the check into the delete operation (i.e. don't
> > delete an address if there is still an enslaved device with this MAC
> > address).
>
> You will have to move the entry with the local bit set, from the deleted
> interface to an other one. It seems to me more complex, but I'm fine
> with your solution.
I decided to allow duplicate MAC addresses in the hash table, as long as they
are all local. How does the attached patch look? It should fix everything
up in a clean way, as far as I can see.
cheers,
Lennert
--- linux-2.4.17-4um-hack/net/bridge/br_fdb.c.orig Wed Jan 9 15:57:18 2002
+++ linux-2.4.17-4um-hack/net/bridge/br_fdb.c Wed Jan 9 16:51:39 2002
@@ -292,7 +292,8 @@
write_lock_bh(&br->hash_lock);
fdb = br->hash[hash];
while (fdb != NULL) {
- if (!memcmp(fdb->addr.addr, addr, ETH_ALEN)) {
+ if (!fdb->is_local &&
+ !memcmp(fdb->addr.addr, addr, ETH_ALEN)) {
__fdb_possibly_replace(fdb, source, is_local);
write_unlock_bh(&br->hash_lock);
return;
_______________________________________________
Bridge mailing list
[EMAIL PROTECTED]
http://www.math.leidenuniv.nl/mailman/listinfo/bridge