﻿id,summary,reporter,owner,description,type,status,component,version,resolution,keywords,cc,guest,host
14855,Linux: Link local IPv6 address is the only one returned for host-only interfaces,timuralp,,"When configuring IPv6 on Linux, the interface may have a Link Local Address (fe::) in addition to the address configured through VirtualBox. VirtualBox retrieves the addresses from {{{/proc/net/if_inet6}}}. Here is an example of what these entries look like:
{{{
$ cat /proc/net/if_inet6 
00000000000000000000000000000001 01 80 10 80       lo
fd22dfff102810700000000000000000 06 40 00 80 vboxnet3
fe80000000000000020acdfffe20a291 02 40 20 80     eth0
fe80000000000000080027fffe000003 06 40 20 80 vboxnet3
}}}

Note the order of the addresses. When VirtualBox parses the file, the code assumes there would only be one entry for an interface (and does not terminate early), i.e. (this is NetIf-linux.cpp):
{{{#!c
173             for (;;)
174             {
[...]
182                 if (n == EOF)
183                     break;
184                 if (n != 9 || uLength > 128)
185                 {
[...]
188                     break;
189                 }
190                 if (!strcmp(Req.ifr_name, szName))
191                 {
192                     pInfo->IPv6Address.au32[0] = htonl(IPv6Address.au32[0]);
193                     pInfo->IPv6Address.au32[1] = htonl(IPv6Address.au32[1]);
194                     pInfo->IPv6Address.au32[2] = htonl(IPv6Address.au32[2]);
195                     pInfo->IPv6Address.au32[3] = htonl(IPv6Address.au32[3]);
196                     ASMBitSetRange(&pInfo->IPv6NetMask, 0, uLength);
197                 }
198             }
199             fclose(fp);
200         }
}}}

For the above example, the last, Link-Local entry wins. Since VirtualBox does not handle multiple addresses per interface, it should at least ignore the Link-Local automatically created addresses. Unfortunately, this means that it would be impossible to tell which address to pick if a user configures a different link-local address.

I attached a proposed patch to resolve this.",defect,new,network/hostif,VirtualBox 5.0.10,,,,other,Linux
