1. A method, comprising: receiving an advertisement at a node in a network, the advertisement comprising a metric value and a gain factor, wherein the metric value indicates a path cost to a root node of the network, and wherein the metric value is advertised only when it exceeds a threshold; determining at the node a local link cost and a local gain factor for each link of the node; computing a resulting path cost from the node to the root node and a cumulative gain factor based on the metric value, the gain factor, the local link cost, and the local gain factor; and advertising the resulting path cost and the cumulative gain factor at the node to another node in the network.