VirtualBox

Ignore:
Timestamp:
May 14, 2010 11:46:15 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
61590
Message:

VBoxNetFlt/win: Report stuff both when attaching to the NIC and when connecting to the internal networking. Set the trunk state to INACTIVE when connecting to the internal work or we won't report anything.

File:
1 edited

Legend:

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

    r29108 r29464  
    32173217}
    32183218
     3219
     3220/**
     3221 * Report the MAC address, promiscuous mode setting, GSO capabilities and
     3222 * no-preempt destinations to the internal network.
     3223 *
     3224 * Does nothing if we're not currently connected to an internal network.
     3225 *
     3226 * @param   pThis           The instance data.
     3227 */
     3228static void vboxNetFltWinReportStuff(PVBOXNETFLTINS pThis)
     3229{
     3230    /** @todo Keep these up to date, esp. the promiscuous mode bit. */
     3231    if (   pThis->pSwitchPort
     3232        && vboxNetFltTryRetainBusyNotDisconnected(pThis))
     3233    {
     3234        pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
     3235        pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort,
     3236                                                     vboxNetFltWinIsPromiscuous2(pThis));
     3237        pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0,
     3238                                                     INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
     3239        /** @todo We should be able to do pfnXmit at DISPATCH_LEVEL... */
     3240        pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
     3241        vboxNetFltRelease(pThis, true /*fBusy*/);
     3242    }
     3243}
     3244
    32193245/**
    32203246 * Worker for vboxNetFltWinAttachToInterface.
     
    33063332
    33073333                            /* 5. Report MAC address, promiscuousness and GSO capabilities. */
    3308                             /** @todo Keep these up to date, esp. the promiscuous mode bit. */
    3309                             if (   pThis->pSwitchPort
    3310                                 && vboxNetFltTryRetainBusyNotDisconnected(pThis))
    3311                             {
    3312                                 pThis->pSwitchPort->pfnReportMacAddress(pThis->pSwitchPort, &pThis->u.s.MacAddr);
    3313                                 pThis->pSwitchPort->pfnReportPromiscuousMode(pThis->pSwitchPort,
    3314                                                                              vboxNetFltWinIsPromiscuous2(pThis));
    3315                                 pThis->pSwitchPort->pfnReportGsoCapabilities(pThis->pSwitchPort, 0,
    3316                                                                              INTNETTRUNKDIR_WIRE | INTNETTRUNKDIR_HOST);
    3317                                 /** @todo We should be able to do pfnXmit at DISPATCH_LEVEL... */
    3318                                 pThis->pSwitchPort->pfnReportNoPreemptDsts(pThis->pSwitchPort, 0 /* none */);
    3319                                 vboxNetFltRelease(pThis, true /*fBusy*/);
    3320                             }
     3334                            vboxNetFltWinReportStuff(pThis);
     3335
    33213336                            return;
    33223337                        }
     
    37183733    vboxNetFltWinJobSynchExecAtPassive(vboxNetFltWinConnectItWorker, &Info);
    37193734
     3735    if (RT_SUCCESS(Info.Status))
     3736        vboxNetFltWinReportStuff(pThis);
     3737
    37203738    return Info.Status;
    37213739}
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