Add mask comparison to IP compare