fixes #550
split up the if/else so that both ipv4 and ipv6 tests can run without
returning immediately. this allows a single field to accept either type.
Merge pull request #551 from beeglebug/master

fixes #550