Use proper MASK for endpoint direction.