domainname must not be an IP
This commit is contained in:
@ -503,6 +503,13 @@ class DomainnameOption(Option):
|
||||
return
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
try:
|
||||
IP('{0}/32'.format(value))
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
raise ValueError(_('invalid domainname, must not be an IP'))
|
||||
if self._get_extra('_dom_type') == 'netbios':
|
||||
part_name_length = 15
|
||||
else:
|
||||
|
Reference in New Issue
Block a user