VirtualBox

Changeset 67634 in vbox for trunk/src


Ignore:
Timestamp:
Jun 27, 2017 10:46:55 AM (8 years ago)
Author:
vboxsync
Message:

Main/HostNetworkInterfaceImpl: Restore all-zeroes (any) IPv6 address
checks lost in r116320. GUI expressly checks for it and forbids it,
so we end up with providing GUI with the default it considers invalid.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/HostNetworkInterfaceImpl.cpp

    r67633 r67634  
    168168        m.realNetworkMask = m.networkMask = info.IPNetMask.u;
    169169        m.dhcpEnabled = info.bDhcpEnabled;
    170         m.realIPV6Address = m.IPV6Address = Bstr(Utf8StrFmt("%RTnaipv6", &info.IPv6Address));
     170        if (info.IPv6Address.s.Lo || info.IPv6Address.s.Hi)
     171            m.realIPV6Address = m.IPV6Address = Bstr(Utf8StrFmt("%RTnaipv6", &info.IPv6Address));
     172        else
     173            m.realIPV6Address = m.IPV6Address = Bstr("");
    171174        RTNetMaskToPrefixIPv6(&info.IPv6NetMask, &iPrefixIPv6);
    172175        m.realIPV6PrefixLength = m.IPV6NetworkMaskPrefixLength = iPrefixIPv6;
     
    227230    m.realIPAddress = m.IPAddress = pIf->IPAddress.u;
    228231    m.realNetworkMask = m.networkMask = pIf->IPNetMask.u;
    229     m.realIPV6Address = m.IPV6Address = Bstr(Utf8StrFmt("%RTnaipv6", &pIf->IPv6Address));
     232    if (pIf->IPv6Address.s.Lo || pIf->IPv6Address.s.Hi)
     233        m.realIPV6Address = m.IPV6Address = Bstr(Utf8StrFmt("%RTnaipv6", &pIf->IPv6Address));
     234    else
     235        m.realIPV6Address = m.IPV6Address = Bstr("");
    230236    RTNetMaskToPrefixIPv6(&pIf->IPv6NetMask, &iPrefixIPv6);
    231237    m.realIPV6PrefixLength = m.IPV6NetworkMaskPrefixLength = iPrefixIPv6;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette