VirtualBox

Changeset 24712 in vbox for trunk/src/VBox/Devices


Ignore:
Timestamp:
Nov 17, 2009 10:36:11 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
54904
Message:

#3987: Virtio: Drop packets if VM is not running or cable is disconnected.

File:
1 edited

Legend:

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

    r24705 r24712  
    16801680    if (RT_FAILURE(rc))
    16811681        return rc;
     1682
     1683    /* Drop packets if VM is not running or cable is disconnected. */
     1684    VMSTATE enmVMState = PDMDevHlpVMState(pState->VPCI.CTX_SUFF(pDevIns));
     1685    if ((   enmVMState != VMSTATE_RUNNING
     1686         && enmVMState != VMSTATE_RUNNING_LS)
     1687        || !(STATUS & VNET_S_LINK_UP))
     1688        return VINF_SUCCESS;
    16821689
    16831690    STAM_PROFILE_ADV_START(&pState->StatReceive, a);
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