diff --git a/management/univention-directory-manager-modules/modules/univention/admin/syntax.py b/management/univention-directory-manager-modules/modules/univention/admin/syntax.py index ba336ed..0fc9e04 100644 --- a/management/univention-directory-manager-modules/modules/univention/admin/syntax.py +++ b/management/univention-directory-manager-modules/modules/univention/admin/syntax.py @@ -1237,6 +1237,13 @@ class reverseLookupSubnet(simple): regex = re.compile(r'^((%s)|(%s))$' % (regex_IPv4, regex_IPv6, )) error_message = _('A subnet for reverse lookup consists of the first one to three parts of an IPv4 address (example: "192.168.0") or of the first 1 to 31 nibbles of an IPv6 address with leading zeroes and without :: substitution (example: "2001:0db8:010")') + @classmethod + def parse(cls, text): + text = super(reverseLookupSubnet, cls).parse(text) + if text in ('0', '127', '255'): + raise univention.admin.uexceptions.valueError(_("The subnets 0, 127 and 255 are preserved.")) + return text + class reverseLookupZoneName(simple): # <- IPv6 reverse zone -> <- IPv4 reverse zone -> # nibble dot-separated ...arpa <- 0-255 -> dot-separated .arpa