VirtualBox

Changeset 24455 in vbox


Ignore:
Timestamp:
Nov 6, 2009 3:46:29 PM (15 years ago)
Author:
vboxsync
Message:

PCNet: drop RX packets if the link is down

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/DevPCNet.cpp

    r24265 r24455  
    617617#endif
    618618static void pcnetPollTimerStart(PCNetState *pThis);
     619
     620/**
     621 * Checks if the link is up.
     622 * @returns true if the link is up.
     623 * @returns false if the link is down.
     624 */
     625DECLINLINE(bool) pcnetIsLinkUp(PCNetState *pThis)
     626{
     627    return pThis->pDrv && !pThis->fLinkTempDown && pThis->fLinkUp;
     628}
    619629
    620630/**
     
    18491859        return;
    18501860
     1861    /*
     1862     * Drop packets if the cable is not connected
     1863     */
     1864    if (!pcnetIsLinkUp(pThis))
     1865        return;
     1866
    18511867    Log(("#%d pcnetReceiveNoSync: size=%d\n", PCNET_INST_NR, cbToRecv));
    18521868
     
    20372053    pcnetPollRxTx(pThis);
    20382054    pcnetUpdateIrq(pThis);
    2039 }
    2040 
    2041 
    2042 /**
    2043  * Checks if the link is up.
    2044  * @returns true if the link is up.
    2045  * @returns false if the link is down.
    2046  */
    2047 DECLINLINE(bool) pcnetIsLinkUp(PCNetState *pThis)
    2048 {
    2049     return pThis->pDrv && !pThis->fLinkTempDown && pThis->fLinkUp;
    20502055}
    20512056
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