Validate ip masks