Utility method to check IP address is within CIDR range