Handle weighted Subnets in switch and hub modes.

We now handle MAC Subnets in exactly the same way as IPv4 and IPv6 Subnets.
This also fixes a problem that causes unncessary broadcasting of unicast
packets in VPNs where some daemons run 1.0.10 and some run other versions.
This commit is contained in:
Guus Sliepen 2009-10-20 22:33:16 +02:00
parent 3a925479c2
commit 43a6e78664
2 changed files with 41 additions and 3 deletions

View file

@ -117,6 +117,7 @@ static void learn_mac(mac_t *address) {
subnet->type = SUBNET_MAC;
subnet->expires = now + macexpire;
subnet->net.mac.address = *address;
subnet->weight = 10;
subnet_add(myself, subnet);
/* And tell all other tinc daemons it's our MAC */