VirtualBox

Changeset 49102 in vbox for trunk/src/VBox/NetworkServices


Ignore:
Timestamp:
Oct 15, 2013 4:18:36 AM (11 years ago)
Author:
vboxsync
Message:

Listen for VBoxEventType_OnNATNetworkSetting to pick up changes in
AdvertiseDefaultIPv6RouteEnabled.

XXX: We also need to prod rtadvd to send unsolicited advertisement
with updated router lifetime, but event delivery seems to be busted,
so I can't test that properly. For now just pick up the flag, that
will be announced on the next scheduled advertisement.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/NetworkServices/NAT/VBoxNetLwipNAT.cpp

    r49096 r49102  
    223223    switch (aEventType)
    224224    {
     225        case VBoxEventType_OnNATNetworkSetting:
     226        {
     227            ComPtr<INATNetworkSettingEvent> evSettings(pEvent);
     228            // XXX: only handle IPv6 default route for now
     229
     230            if (!m_ProxyOptions.ipv6_enabled)
     231            {
     232                break;
     233            }
     234
     235            BOOL fIPv6DefaultRoute = FALSE;
     236            hrc = evSettings->COMGETTER(AdvertiseDefaultIPv6RouteEnabled)(&fIPv6DefaultRoute);
     237            AssertReturn(SUCCEEDED(hrc), hrc);
     238
     239            if (m_ProxyOptions.ipv6_defroute == fIPv6DefaultRoute)
     240            {
     241                break;
     242            }
     243
     244            // XXX: TODO: should prod rtadvd for immediate unsolicited
     245            // advertisement with new router lifetime
     246            m_ProxyOptions.ipv6_defroute = fIPv6DefaultRoute;
     247
     248            break;
     249        }
     250       
    225251        case VBoxEventType_OnNATNetworkPortForward:
    226252        {
     
    882908    com::SafeArray<VBoxEventType_T> events;
    883909    events.push_back(VBoxEventType_OnNATNetworkPortForward);
     910    events.push_back(VBoxEventType_OnNATNetworkSetting);
    884911
    885912    hrc = pES->RegisterListener(listener, ComSafeArrayAsInParam(events), true);
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