diff --git a/machines/forms.py b/machines/forms.py index ecffcc71..ff529295 100644 --- a/machines/forms.py +++ b/machines/forms.py @@ -218,7 +218,8 @@ class IpTypeForm(FormRevMixin, ModelForm): class Meta: model = IpType fields = ['type', 'extension', 'need_infra', 'domaine_ip_start', - 'domaine_ip_stop', 'prefix_v6', 'vlan', 'ouverture_ports'] + 'domaine_ip_stop', 'dnssec_reverse_v4', 'prefix_v6', + 'dnssec_reverse_v6', 'vlan', 'ouverture_ports'] def __init__(self, *args, **kwargs): prefix = kwargs.pop('prefix', self.Meta.model.__name__) @@ -231,6 +232,7 @@ class EditIpTypeForm(IpTypeForm): synchroniser les objets iplist""" class Meta(IpTypeForm.Meta): fields = ['extension', 'type', 'need_infra', 'prefix_v6', 'vlan', + 'dnssec_reverse_v4', 'dnssec_reverse_v6', 'ouverture_ports'] diff --git a/machines/models.py b/machines/models.py index e981bf10..7a211fe1 100644 --- a/machines/models.py +++ b/machines/models.py @@ -256,11 +256,19 @@ class IpType(RevMixin, AclMixin, models.Model): need_infra = models.BooleanField(default=False) domaine_ip_start = models.GenericIPAddressField(protocol='IPv4') domaine_ip_stop = models.GenericIPAddressField(protocol='IPv4') + dnssec_reverse_v4 = models.BooleanField( + default=False, + help_text="Activer DNSSEC sur le reverse DNS IPv4", + ) prefix_v6 = models.GenericIPAddressField( protocol='IPv6', null=True, blank=True ) + dnssec_reverse_v6 = models.BooleanField( + default=False, + help_text="Activer DNSSEC sur le reverse DNS IPv6", + ) vlan = models.ForeignKey( 'Vlan', on_delete=models.PROTECT, diff --git a/machines/templates/machines/aff_iptype.html b/machines/templates/machines/aff_iptype.html index fa2a2767..bee4669b 100644 --- a/machines/templates/machines/aff_iptype.html +++ b/machines/templates/machines/aff_iptype.html @@ -34,11 +34,11 @@ with this program; if not, write to the Free Software Foundation, Inc., Extension Nécessite l'autorisation infra Plage ipv4 - Préfixe v6 + Préfixe v6 + DNSSEC reverse v4/v6 Sur vlan Ouverture ports par défault - {% for type in iptype_list %} @@ -46,8 +46,9 @@ with this program; if not, write to the Free Software Foundation, Inc., {{ type.type }} {{ type.extension }} {{ type.need_infra|tick }} - {{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }} - {{ type.prefix_v6 }} + {{ type.domaine_ip_start }}-{{ type.domaine_ip_stop }} + {{ type.prefix_v6 }} + {{ type.dnssec_reverse_v4|tick }}/{{ type.dnssec_reverse_v6|tick }} {{ type.vlan }} {{ type.ouverture_ports }}