Changeset 35961 in vbox for trunk/src/VBox/Main
- Timestamp:
- Feb 14, 2011 2:58:58 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/freebsd/NetIf-freebsd.cpp
r28800 r35961 181 181 int aiMib[6]; 182 182 unsigned short u16DefaultIface; 183 bool fDefaultIfaceExistent = true; 183 184 184 185 /* Get the index of the interface associated with default route. */ 185 186 rc = getDefaultIfaceIndex(&u16DefaultIface, PF_INET); 186 187 if (RT_FAILURE(rc)) 187 return rc; 188 { 189 fDefaultIfaceExistent = false; 190 rc = VINF_SUCCESS; 191 } 188 192 189 193 aiMib[0] = CTL_NET; … … 287 291 if (SUCCEEDED(IfObj->init(Bstr(pNew->szName), enmType, pNew))) 288 292 /* Make sure the default interface gets to the beginning. */ 289 if (pIfMsg->ifm_index == u16DefaultIface) 293 if ( fDefaultIfaceExistent 294 && pIfMsg->ifm_index == u16DefaultIface) 290 295 list.push_front(IfObj); 291 296 else
Note:
See TracChangeset
for help on using the changeset viewer.