From: Guus Sliepen Date: Thu, 5 Mar 2009 12:34:13 +0000 (+0100) Subject: Allow weight to be assigned to Subnets. X-Git-Tag: release-1.0.10~83 X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=5674bba5c54c1aee3a4ac5b3aba6b3ebded91bbc;hp=5674bba5c54c1aee3a4ac5b3aba6b3ebded91bbc Allow weight to be assigned to Subnets. Tinc allows multiple nodes to own the same Subnet, but did not have a sensible way to decide which one to send packets to. Tinc also did not check the reachability of nodes when deciding where to route packets to, so it would not automatically fail over to a reachable node. Tinc now assigns a weight to each Subnet. The default weight is 10, with lower weights having higher priority. The Subnets are now internally sorted in the same way as the kernel's routing table, and the Subnets are search linearly, skipping those of unreachable nodes. A small cache of recently used addresses is used to speed up the lookup functions. ---