- Timestamp:
- Sep 10, 2008 8:11:30 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 36347
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
r12319 r12326 81 81 /** Dynamic module binding specific oddities. */ 82 82 #define VBOXNETFLT_IFNAME_LEN LIFNAMSIZ + 1 83 #define VBOXNETFLT_MODE_REQ_MAGIC 0xacce55ed84 83 85 84 … … 324 323 325 324 static int vboxNetFltSolarisUnitDataToRaw(PVBOXNETFLTINS pThis, mblk_t *pMsg, mblk_t **ppRawMsg); 325 static int vboxNetFltSolarisRawToUnitData(mblk_t *pMsg, mblk_t **ppDlpiMsg); 326 326 327 327 static mblk_t *vboxNetFltSolarisMBlkFromSG(PVBOXNETFLTINS pThis, PINTNETSG pSG, uint32_t fDst); … … 860 860 if (pIOC->ioc_id == pStream->ModeReqId) 861 861 { 862 pStream->ModeReqId = VBOXNETFLT_MODE_REQ_MAGIC;863 862 pStream->fRawMode = !pStream->fRawMode; 864 865 /* 866 * Somehow raw mode is turned off?? This should never really happen... 867 */ 868 if (pStream->fRawMode == false) 869 { 870 LogFlow((DEVICE_NAME ":re-requesting raw mode!\n")); 871 vboxNetFltSolarisSetRawMode(pQueue); 872 } 863 LogFlow((DEVICE_NAME ":VBoxNetFltSolarisModReadPut: Mode acknowledgement. RawMode is %s\n", 864 pStream->fRawMode ? "ON" : "OFF")); 873 865 874 866 freemsg(pMsg); … … 1048 1040 miocack(pQueue, pMsg, msgsize(pMsg->b_cont), EINVAL); 1049 1041 LogFlow((DEVICE_NAME ":VBoxNetFltSolarisModWritePut: Fast path request acknowledged.\n")); 1050 LogFlow((DEVICE_NAME ":VBoxNetFltSolarisModWritePut: ============================================\n"));1051 1042 } 1052 1043 } … … 1707 1698 if (RT_SUCCESS(rc)) 1708 1699 { 1709 bool fRawModeOk = true; 1710 #if 0 1711 bool fRawModeOk = !fAttach; /* Raw mode check is always ok during the detach case */ 1712 if (fAttach) 1713 { 1714 /* 1715 * Check if our raw mode request was successful (only in the IP stream). 1716 */ 1717 vboxnetflt_stream_t *pStream = pThis->u.s.pvStream; 1718 if (RT_LIKELY(pStream)) 1719 { 1720 if ( pStream->fRawMode == true 1721 && pStream->ModeReqId == VBOXNETFLT_MODE_REQ_MAGIC) 1722 { 1723 pStream->ModeReqId = 0; 1724 fRawModeOk = true; 1725 } 1726 } 1727 } 1728 #endif 1729 1730 if (fRawModeOk) 1731 { 1732 /* 1733 * Close the devices ONLY during the return from function case; otherwise 1734 * we end up close twice which is an instant kernel panic. 1735 */ 1736 vboxNetFltSolarisCloseDev(pVNodeUDPHeld, pUserUDP); 1737 ldi_close(ARPDevHandle, FREAD | FWRITE, kcred); 1738 ldi_close(IPDevHandle, FREAD | FWRITE, kcred); 1739 1740 LogFlow((DEVICE_NAME ":vboxNetFltSolarisModSetup: Success! %s %s@(Ip:%d Arp:%d) " 1741 "%s interface %s\n", fAttach ? "Injected" : "Ejected", StrMod.mod_name, 1742 StrMod.pos, ArpStrMod.pos, fAttach ? "to" : "from", pThis->szName)); 1743 return VINF_SUCCESS; 1744 } 1745 else 1746 LogRel((DEVICE_NAME ":vboxNetFltSolarisModSetup: Raw mode request failed.\n")); 1700 /* 1701 * Close the devices ONLY during the return from function case; otherwise 1702 * we end up close twice which is an instant kernel panic. 1703 */ 1704 vboxNetFltSolarisCloseDev(pVNodeUDPHeld, pUserUDP); 1705 ldi_close(ARPDevHandle, FREAD | FWRITE, kcred); 1706 ldi_close(IPDevHandle, FREAD | FWRITE, kcred); 1707 1708 LogFlow((DEVICE_NAME ":vboxNetFltSolarisModSetup: Success! %s %s@(Ip:%d Arp:%d) " 1709 "%s interface %s\n", fAttach ? "Injected" : "Ejected", StrMod.mod_name, 1710 StrMod.pos, ArpStrMod.pos, fAttach ? "to" : "from", pThis->szName)); 1711 return VINF_SUCCESS; 1747 1712 } 1748 1713 else
Note:
See TracChangeset
for help on using the changeset viewer.