Changeset 50298 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
- Timestamp:
- Jan 31, 2014 10:54:41 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
r48952 r50298 983 983 984 984 985 /** 986 * Attempt to detect if a cable is attached to a network card. 987 * There is no direct way to detect this at any time. We assume 988 * if interface's baud rate is not zero then cable is attached. 989 */ 990 static int vboxNetFltCableAttached(ifnet_t pIfNet) 991 { 992 return (ifnet_baudrate(pIfNet) != 0); 993 } 994 995 985 996 int vboxNetFltPortOsXmit(PVBOXNETFLTINS pThis, void *pvIfData, PINTNETSG pSG, uint32_t fDst) 986 997 { … … 991 1002 if (pIfNet) 992 1003 { 1004 /* 1005 * Do not send any data to a network stack if cable is not attached 1006 * to a network card device in order to prevent stuck-in-dock problem. */ 1007 if (!vboxNetFltCableAttached(pIfNet)) 1008 { 1009 vboxNetFltDarwinReleaseIfNet(pThis, pIfNet); 1010 return rc; 1011 } 1012 993 1013 /* 994 1014 * Create a mbuf for the gather list and push it onto the wire.
Note:
See TracChangeset
for help on using the changeset viewer.