I can create a tun device by using:
ifconfig tun0 create
ifconfig tun 10.1.2.0 188.8.131.52
ifconfig tun alias 184.108.40.206 220.127.116.11
This works great and allows me to use the 10.1.2.0 and have it tunneled over the second (aliased) tunnel when I set up the correct route using /sbin/route add -net 10.0.0.0/8 -iface tun0.
I have this setup, using IPv6 only working as it is supposed to. To explain what I am am actually achieving with this: In the background I am using BGP over a one-to-one VPN software using the tunnel interface.
Doing the same thing on IPv6, however doesn't work when I add an alias, using the same destination address twice:
ifconfig tun0 inet6 fdaa:abc:abc:abc::1 fe80::111:0 prefixlen /128
ifconfig tun0 inet6 alias fe80::111:1 fe80::111:0 prefixlen /128
ifconfig: ioctl (SIOCAIFADDR): File exists
Using another destination address this works however. Since this works on IPv4 I'd expect it to work here as well.
I have same bug on 12.1… "file exists":
socket(PF_INET,SOCK_DGRAM|SOCK_CLOEXEC,0) = 3 (0x3)
ioctl(3,SIOCGIFINDEX,0x7fffffff9f20) = 0 (0x0)
close(3) = 0 (0x0)
__sysctl(0x7fffffff9f40,0x6,0x0,0x7fffffff9f38,0x0,0x0) = 0 (0x0)
__sysctl(0x7fffffff9f40,0x6,0x80161e000,0x7fffffff9f38,0x0,0x0) = 0 (0x0)
socket(PF_INET6,SOCK_DGRAM,0) = 3 (0x3)
ioctl(3,SIOCDIFADDR_IN6,0x1054278) ERR#49 'Can't assign requested address'
ioctl(3,SIOCAIFADDR_IN6,0x1054278) ERR#17 'File exists'
ifconfig: write(2,"ifconfig: ",10) = 10 (0xa)
ioctl (SIOCAIFADDR)write(2,"ioctl (SIOCAIFADDR)",19) = 19 (0x13)
: write(2,": ",2) = 2 (0x2)
write(2,"File exists\n",12) = 12 (0xc)
process exit, rval = 1