From cdc0e80300a465d507aba8e8d11be56366ebb6cd Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Tue, 31 Jan 2017 16:46:15 +0100 Subject: interface: add prefix assignment priority support In case of prefix delegation prefixes are assigned to one or more configured downstream interfaces. The delegated prefix length in combination with the assignment length of the downstream interfaces determines the number of subnets which can be allocated from the delegated prefix. The interface ip6weight parameter allows to prioritize the allocation of subnets to interfaces in case of multiple configured downstream interfaces. The order of interface prefix assignment from a delegated prefix is based on the following parameters: - Primary key is prefix assignment based on the configured interface ip6hint - Secondary key is the requested downstream interface prefix length, interfaces configured with the smallest ip6hint will be assigned first - Third key is the assigned interface ip6weight in case of equal prefix assignment length; interfaces having the highest ip6weight will be assigned first - Finally the alphabetical order of the interfaces in case of equal ip6weight Signed-off-by: Hans Dedecker Signed-off-by: Felix Fietkau [cleanup] --- interface-ip.h | 1 + 1 file changed, 1 insertion(+) (limited to 'interface-ip.h') diff --git a/interface-ip.h b/interface-ip.h index 01727c9..197bd9a 100644 --- a/interface-ip.h +++ b/interface-ip.h @@ -59,6 +59,7 @@ struct device_prefix_assignment { struct list_head head; int32_t assigned; uint8_t length; + int weight; struct in6_addr addr; bool enabled; char name[]; -- cgit v1.2.1