Fixed ip filter unit tests and ip filter bugs