network: fix detection of ipv6 availability