net: Fix more upstream (Samba) bugs in getifaddrs.
net: Fix more upstream (Samba) bugs in getifaddrs.

- It's not necessary to do SIOCGIFADDR after SIOCGIFCONF as SIOCGIFCONF already returns sockaddr for each ifreq entry. This also fixes false breaks on OS/2 where doing SIOCGIFADDR on AF_LINK entries ends up with EADDRNOTAVAIL.
- It's not correct (not portable) to request SIOCGIFNETMASK on entries other than AF_INET (would fail with EADDRNOTAVAIL on OS/2 as well). See e.g. https://linux.die.net/man/7/netdevice.
- It would leak a file descriptor on failure to do SIOCGIFFLAGS on any other further request on entries returned by SIOCGIFCONF.

See #37 for more info.

bitwiseworks/libcx,bitwiseworks/libcx