Commit dc814b36 authored by Xavier Thompson's avatar Xavier Thompson

slapformat: WIP: Improve link-local None code

parent 071b46bc
......@@ -433,17 +433,14 @@ class Tap(object):
self.ipv4_address = interface.getTapIPv4Range(index)
# Tap IPv6: host-to-tap gateway and tap-to-host address
ipv6_gateway = options['ipv6_gateway']
link_local = None # link-local address resolved later
if ipv6_gateway:
self.ipv6_gateway = ipaddress.IPv4Interface(ipv6_gateway)
ipv6_address = options['ipv6_address']
if ipv6_address:
self.ipv6_address = ipaddress.IPv6Interface(ipv6_address)
else:
self.ipv6_address = link_local
elif conf.tap_ipv6:
self.ipv6_gateway = interface.getTapIPv6Range(index)
self.ipv6_address = link_local
# If needed, ipv6_address will be set to link-local in format
def format(self, interface, user):
tap = self.name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment