Handle weighted Subnets in switch and hub modes.
[tinc] / src / route.c
index 2da781e..5c69671 100644 (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->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 */
                subnet_add(myself, subnet);
 
                /* And tell all other tinc daemons it's our MAC */