From 62810f079e47025145fa4f2b94c1e5731f8ee031 Mon Sep 17 00:00:00 2001 From: Thomas Thrainer Date: Mon, 25 Nov 2013 15:48:41 +0100 Subject: [PATCH] Allow link local IPv6 gateways Each host using IPv6 always has a link local address in fe80::/10. It is common to use fe80::1 as default gateway to ease client configuration. Ganeti prevented this usage, because it made sure that the IPv6 gateway is in the IPv6 network the instance is connected to. This patch also allows to specify a IPv6 gateway in the link local network in addition to the network the instance is connected to. This fixes issue 624. Signed-off-by: Thomas Thrainer Reviewed-by: Michele Tartara --- lib/network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/network.py b/lib/network.py index d78b717..0356476 100644 --- a/lib/network.py +++ b/lib/network.py @@ -160,7 +160,7 @@ class AddressPool(object): assert self.gateway in self.network if self.network6 and self.gateway6: - assert self.gateway6 in self.network6 + assert self.gateway6 in self.network6 or self.gateway6.is_link_local return True -- 1.7.10.4