IPv6 Connectivity
Nikos Mavrogiannopoulos
n.mavrogiannopoulos at gmail.com
Wed Jan 29 12:50:21 EST 2014
On Wed, Jan 29, 2014 at 6:00 PM, David Woodhouse <dwmw2 at infradead.org> wrote:
>> Indeed. I realized that in Linux there is black magic involved to set
>> an IPv6 address to a device. The same ioctl is used (SIOCSIFADDR) but
>> a different structure is passed (in6_ifreq) which isn't typically
>> defined. Moreover SIOCGIFADDR isn't able to read the IPv6 address.
> You should be using netlink for configuration, not the legacy ioctls.
>> I think also that my assumption that a tun device allows for both an
>> IPv4 and IPv6 address isn't true.
> You *can* have both IPv6 and Legacy IP on a tun device simultaneously.
> But perhaps not if you're just using the legacy ioctls?
Ok I spent some time on it and it seems it works (fortunately with the
legacy ioctls()). I'm not sure if that's entirely correct since
ifconfig on my fedora doesn't report the IPv6 on the tun device, but
getifaddrs() returns the correct info. I now use getifaddrs() to
obtain information on the tun device which looks fairly portable but
it is also wasteful on systems with multiple connections. It seems
that I'll have to convert it to netlink.
regards,
Nikos
More information about the openconnect-devel
mailing list