fix port 0 hack for unit tests with ipv6