networkd-dhcp6: Set one unreachable route per DHCPv6 delegated prefix
authorPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 19 Sep 2018 00:32:19 +0000 (18:32 -0600)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 19 Sep 2018 19:45:18 +0000 (13:45 -0600)
commit494c868d1fcdb72e0aed575ff0da36138b5af4b7
tree5bb50ab9ef3f6a8710a1a28cda917218bd2b94d3
parent9a7225de67ddfb48a2f75f125c16bfe76421ae9c
networkd-dhcp6: Set one unreachable route per DHCPv6 delegated prefix

Instead of setting many small unreachable routes for each of the /64
subnets that were not distributed between the links requesting delegated
prefixes, set one unreachable route for the size of the delegated
prefix. Each subnet asssigned to a downstream link will add a routable
subnet for that link, and as the subnet assigned to the downstream link
has a longer prefix than the whole delegated prefix, the downstream
link subnet routes are preferred over the unroutable delegated one.
The unreachable route is not added when the delegated prefix is exactly
a /64 as the prefix size cannot be used to sort out the order of routing
into a bigger blocking subnet with the smaller /64 punching routable
"holes" into it.

When stopping the DHCPv6 client, the unroutable delegated prefix is
removed before the downstream link prefixes are unassigned.
src/network/networkd-dhcp6.c