Changeset 27696 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt
- Timestamp:
- Mar 25, 2010 11:54:23 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59292
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
r26710 r27696 1827 1827 pszEnd++; 1828 1828 1829 int rc ;1830 long PPA ;1829 int rc = VERR_GENERAL_FAILURE; 1830 long PPA = -1; 1831 1831 if ( pszEnd 1832 1832 && ddi_strtol(pszEnd, NULL, 10, &PPA) == 0) … … 1853 1853 1854 1854 ldi_close(pThis->u.s.hIface, FREAD | FWRITE, kcred); 1855 pThis->u.s.hIface = NULL; 1855 1856 LogRel((DEVICE_NAME ":vboxNetFltSolarisOpenStyle2 dl_attach failed. rc=%d szDev=%s PPA=%d rc=%d\n", rc, szDev, PPA)); 1856 1857 } … … 1952 1953 1953 1954 ldi_close(pThis->u.s.hIface, FREAD | FWRITE, kcred); 1955 pThis->u.s.hIface = NULL; 1954 1956 1955 1957 return VERR_INTNET_FLT_IF_FAILED; … … 1966 1968 LogFlowFunc((DEVICE_NAME ":vboxNetFltSolarisCloseStream pThis=%p\n")); 1967 1969 1968 ldi_close(pThis->u.s.hIface, FREAD | FWRITE, kcred); 1970 if (pThis->u.s.hIface) 1971 { 1972 ldi_close(pThis->u.s.hIface, FREAD | FWRITE, kcred); 1973 pThis->u.s.hIface = NULL; 1974 } 1969 1975 } 1970 1976 … … 2484 2490 LogFlowFunc((DEVICE_NAME ":vboxNetFltSolarisSetupIp6Polling pThis=%p\n", pThis)); 2485 2491 2486 int rc = V INF_SUCCESS;2492 int rc = VERR_GENERAL_FAILURE; 2487 2493 vboxnetflt_promisc_stream_t *pPromiscStream = ASMAtomicUoReadPtr((void * volatile *)&pThis->u.s.pvPromiscStream); 2488 2494 if (RT_LIKELY(pPromiscStream)) … … 2498 2504 LogRel((DEVICE_NAME ":vboxNetFltSolarisSetupIp6Polling: Invalid polling interval %d. Expected between 1 and 120 secs.\n", 2499 2505 Interval)); 2500 return V INF_SUCCESS;2506 return VERR_INVALID_PARAMETER; 2501 2507 } 2502 2508 … … 2515 2521 } 2516 2522 else 2523 { 2517 2524 LogRel((DEVICE_NAME ":vboxNetFltSolarisSetupIp6Polling: Polling already started.\n")); 2525 rc = VINF_SUCCESS; 2526 } 2518 2527 } 2519 2528 return rc; … … 2572 2581 if (RT_SUCCESS(rc)) 2573 2582 { 2583 /* 2584 * Ipv6 attaching is optional and can fail. We don't bother to bring down the whole 2585 * attach process just if Ipv6 interface is unavailable. 2586 */ 2574 2587 int rc2 = vboxNetFltSolarisAttachIp6(pThis, true /* fAttach */); 2588 2575 2589 #ifdef VBOXNETFLT_SOLARIS_IPV6_POLLING 2590 /* 2591 * If Ip6 interface is not plumbed and an Ip6 polling interval is specified, we need 2592 * to begin polling to attach on the Ip6 interface whenver it comes up. 2593 */ 2576 2594 if ( rc2 == VERR_INTNET_FLT_IF_NOT_FOUND 2577 2595 && g_VBoxNetFltSolarisPollInterval != -1) 2578 2596 { 2579 rc= vboxNetFltSolarisSetupIp6Polling(pThis);2580 if (RT_FAILURE(rc ))2597 int rc3 = vboxNetFltSolarisSetupIp6Polling(pThis); 2598 if (RT_FAILURE(rc3)) 2581 2599 { 2582 ASMAtomicUoWritePtr((void * volatile *)&pThis->u.s.pvIp6Stream, NULL); 2583 vboxNetFltSolarisDetachFromInterface(pThis); 2600 /* 2601 * If we failed to setup Ip6 polling, warn in the release log and continue. 2602 */ 2603 LogRel((DEVICE_NAME ":vboxNetFltSolarisAttachToInterface IPv6 polling inactive. rc=%Rrc\n", rc3)); 2584 2604 } 2585 2605 } 2586 else2587 2606 #endif 2588 ASMAtomicWriteBool(&pThis->fDisconnectedFromHost, false); 2589 } 2590 else 2591 vboxNetFltSolarisCloseStream(pThis); 2607 2608 /* 2609 * Ipv4 is successful, and maybe Ipv6, we're ready for transfers. 2610 */ 2611 ASMAtomicWriteBool(&pThis->fDisconnectedFromHost, false); 2612 return VINF_SUCCESS; 2613 } 2614 2615 vboxNetFltSolarisCloseStream(pThis); 2592 2616 } 2593 2617 else … … 3549 3573 * Init. the solaris specific data. 3550 3574 */ 3575 pThis->u.s.hIface = NULL; 3551 3576 pThis->u.s.pvIp4Stream = NULL; 3552 3577 pThis->u.s.pvIp6Stream = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.