X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Froute.c;h=16423892fa58c479c987d520a26fa6dae1d7afd3;hb=62f235e05c54e458724f437e519ed1b3e17835b1;hp=2da781e5a8adcce7a10eda3089be6abd07e1e42d;hpb=4c85542894f7fca823b119b05e07179deb24229a;p=tinc diff --git a/src/route.c b/src/route.c index 2da781e5..16423892 100644 --- a/src/route.c +++ b/src/route.c @@ -104,7 +104,7 @@ static void learn_mac(mac_t *address) { avl_node_t *node; connection_t *c; - subnet = lookup_subnet_mac(address); + subnet = lookup_subnet_mac(myself, address); /* If we don't know this MAC address yet, store it */ @@ -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 */ @@ -704,7 +705,7 @@ static void route_mac(node_t *source, vpn_packet_t *packet) { /* Lookup destination address */ memcpy(&dest, &packet->data[0], sizeof dest); - subnet = lookup_subnet_mac(&dest); + subnet = lookup_subnet_mac(NULL, &dest); if(!subnet) { broadcast_packet(source, packet);