|
@@ -95,9 +95,13 @@ class VPNConfiguration(CoinLdapSyncMixin, Configuration):
|
|
subnets_v6 = [s for s in subnets if s.inet.version == 6]
|
|
subnets_v6 = [s for s in subnets if s.inet.version == 6]
|
|
if len(subnets_v6) > 0:
|
|
if len(subnets_v6) > 0:
|
|
# With v6, we choose the second host of the subnet (cafe::1)
|
|
# With v6, we choose the second host of the subnet (cafe::1)
|
|
- gen = subnets_v6[0].inet.iter_hosts()
|
|
|
|
- gen.next()
|
|
|
|
- self.ipv6_endpoint = gen.next()
|
|
|
|
|
|
+ net = subnets_v6[0].inet
|
|
|
|
+ if inet.prefixlen != 128:
|
|
|
|
+ gen = inet.iter_hosts()
|
|
|
|
+ gen.next()
|
|
|
|
+ self.ipv6_endpoint = gen.next()
|
|
|
|
+ else:
|
|
|
|
+ self.ipv6_endpoint = inet.ip
|
|
updated = True
|
|
updated = True
|
|
return updated
|
|
return updated
|
|
|
|
|