Commit c404f344 authored by Devaev Maxim's avatar Devaev Maxim

Check for on-digit mask range

parent 93ba433b
......@@ -53,6 +53,8 @@ def validIpv4Netmask(arg) :
if len(octets_list) == 1 :
try :
arg = int(arg)
if not 0 <= arg <= 32 :
raise ValidatorError("Argument \"%s\" is not valid IPv4 netmask" % (arg))
except :
raise ValidatorError("Argument \"%s\" is not valid IPv4 netmask" % (arg))
......
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