VirtualBox

Ignore:
Timestamp:
Jan 23, 2018 3:02:52 PM (7 years ago)
Author:
vboxsync
Message:

NetFlt/Linux: vboxNetFltLinuxAttachToInterface - g/c error handling
code that has been unreachable since r39185. Ok aleksey.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c

    r69797 r70708  
    18711871
    18721872    /*
    1873      * If the above succeeded report GSO capabilities,  if not undo and
    1874      * release the device.
    1875      */
    1876     if (!pDev)
    1877     {
    1878         Assert(pThis->pSwitchPort);
    1879         if (vboxNetFltTryRetainBusyNotDisconnected(pThis))
    1880         {
    1881             vboxNetFltLinuxReportNicGsoCapabilities(pThis);
    1882             pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
    1883             pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, vboxNetFltLinuxPromiscuous(pThis));
    1884             pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
    1885             vboxNetFltRelease(pThis, true /*fBusy*/);
    1886         }
    1887     }
    1888     else
    1889     {
    1890 #ifdef VBOXNETFLT_WITH_HOST2WIRE_FILTER
    1891         vboxNetFltLinuxUnhookDev(pThis, pDev);
    1892 #endif
    1893         RTSpinlockAcquire(pThis->hSpinlock);
    1894         ASMAtomicUoWriteNullPtr(&pThis->u.s.pDev);
    1895         RTSpinlockRelease(pThis->hSpinlock);
    1896         dev_put(pDev);
    1897         Log(("vboxNetFltLinuxAttachToInterface: Device %p(%s) released. ref=%d\n",
    1898              pDev, pDev->name,
    1899 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37)
    1900              netdev_refcnt_read(pDev)
    1901 #else
    1902              atomic_read(&pDev->refcnt)
    1903 #endif
    1904              ));
     1873     * Report GSO capabilities
     1874     */
     1875    Assert(pThis->pSwitchPort);
     1876    if (vboxNetFltTryRetainBusyNotDisconnected(pThis))
     1877    {
     1878        vboxNetFltLinuxReportNicGsoCapabilities(pThis);
     1879        pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
     1880        pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort, vboxNetFltLinuxPromiscuous(pThis));
     1881        pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
     1882        vboxNetFltRelease(pThis, true /*fBusy*/);
    19051883    }
    19061884
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