struct ifreq can't be used for IPv6 as the ifr_addr member is not large enough. Actually, configuring an IPv6 address via an AF_INET socket won't work anyway. And unfortunately, it's not standardized how IPv6 addresses are installed, so we have to do this quite differently on Linux and on BSD. However, we already use SIOCAIFADDR for IPv4 on newer FreeBSD systems, which wasn't the case when this patch was originally created in 2014.