-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
Description
import iptools netmask = '255' valid = iptools.ipv4.validate_netmask(netmask)
This returns True. 255 is not a valid netmask. It seems that this is auto-filling the 0's to make it a full netmask. We were using this tool to check and see if our users are entering valid IP addresses, netmasks, and gateways. Since it is auto-filling if you only have the first octet and nothing else this is not a valid tool which we can use.
Also, we tried inputting '0.255.255.0' and this method returned True.
Reactions are currently unavailable