8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-06-18 08:38:09 +00:00

Ne renvoie une ipv6 que si elle est activée

This commit is contained in:
Gabriel Detraz 2018-01-30 06:36:22 +00:00 committed by root
parent 4039a9125b
commit 1d05ad03bc

View file

@ -1258,8 +1258,10 @@ class Interface(FieldPermissionModelMixin,models.Model):
machine_options, _created = preferences.models.OptionalMachine.objects.get_or_create()
if machine_options.ipv6_mode == 'SLAAC':
return Ipv6List.objects.filter(interface=self)
else:
elif machine_options.ipv6_mode == 'DHCPV6':
return Ipv6List.objects.filter(interface=self, slaac_ip=False)
else:
return None
def mac_bare(self):
""" Formatage de la mac type mac_bare"""