diff --git a/avocado/utils/network/interfaces.py b/avocado/utils/network/interfaces.py index 023691cba8..0f0eb536fa 100644 --- a/avocado/utils/network/interfaces.py +++ b/avocado/utils/network/interfaces.py @@ -766,7 +766,7 @@ def validate_ipv4_netmask_format(self, netmask): return False for octect in netmask_list: num = int(octect) - if 0 <= num <= 255: + if not 0 <= num <= 255: return False octet_bin = [format(int(i), "08b") for i in netmask_list] binary_netmask = ("").join(octet_bin)