VirtualBox

Changeset 35961 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Feb 14, 2011 2:58:58 PM (14 years ago)
Author:
vboxsync
Message:

FreeBSD: Fix finding vboxnet interfaces if there is no default route (Thanks to Mike Telahun Makonnen and Bernhard Froehlich)

File:
1 edited

Legend:

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

    r28800 r35961  
    181181    int aiMib[6];
    182182    unsigned short u16DefaultIface;
     183    bool fDefaultIfaceExistent = true;
    183184
    184185    /* Get the index of the interface associated with default route. */
    185186    rc = getDefaultIfaceIndex(&u16DefaultIface, PF_INET);
    186187    if (RT_FAILURE(rc))
    187         return rc;
     188    {
     189        fDefaultIfaceExistent = false;
     190        rc = VINF_SUCCESS;
     191    }
    188192
    189193    aiMib[0] = CTL_NET;
     
    287291            if (SUCCEEDED(IfObj->init(Bstr(pNew->szName), enmType, pNew)))
    288292                /* Make sure the default interface gets to the beginning. */
    289                 if (pIfMsg->ifm_index == u16DefaultIface)
     293                if (   fDefaultIfaceExistent
     294                    && pIfMsg->ifm_index == u16DefaultIface)
    290295                    list.push_front(IfObj);
    291296                else
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