network: fix detection of ipv6 availability
Merge pull request #3398 from FernetMenta/network

network: fix detection of ipv6 availability