Changeset 25327 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
- Timestamp:
- Dec 11, 2009 1:40:55 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
r25312 r25327 62 62 # define LOCAL static 63 63 64 #define DEBUG_ramshankar65 64 #if defined(DEBUG_ramshankar) 66 65 # undef Log … … 584 583 } 585 584 585 586 586 /** 587 587 * Receive (rx) entry point. … … 595 595 LOCAL void vboxNetFltSolarisRecv(void *pvData, mac_resource_handle_t hResource, mblk_t *pMsg, boolean_t fLoopback) 596 596 { 597 LogFlow((DEVICE_NAME ":vboxNetFltSolarisRecv pvData=%p pMsg=%p fLoopback=%d \n", pvData, pMsg, fLoopback));597 LogFlow((DEVICE_NAME ":vboxNetFltSolarisRecv pvData=%p pMsg=%p fLoopback=%d cbData=%d\n", pvData, pMsg, fLoopback, pMsg ? MBLKL(pMsg) : 0)); 598 598 599 599 PVBOXNETFLTINS pThis = (PVBOXNETFLTINS)pvData; … … 615 615 uint32_t fSrc = INTNETTRUNKDIR_WIRE; 616 616 PRTNETETHERHDR pEthHdr = (PRTNETETHERHDR)pMsg->b_rptr; 617 if (vboxNetFltPortOsIsHostMac(pThis, &pEthHdr->SrcMac)) 617 if ( MBLKL(pMsg) >= sizeof(RTNETETHERHDR) 618 && vboxNetFltPortOsIsHostMac(pThis, &pEthHdr->SrcMac)) 618 619 fSrc = INTNETTRUNKDIR_HOST; 619 620 vboxNetFltSolarisAnalyzeMBlk(pMsg);621 620 622 621 /* … … 777 776 { 778 777 LogFlow((DEVICE_NAME ":vboxNetFltPortOsIsPromiscuous pThis=%p\n", pThis)); 779 return pThis->u.s.hPromiscuous ? true :false;778 return false; 780 779 } 781 780 … … 784 783 { 785 784 LogFlow((DEVICE_NAME ":vboxNetFltPortOsGetMacAddress pThis=%p\n", pThis)); 786 NOREF(pThis); NOREF(pMac);785 *pMac = pThis->u.s.Mac; 787 786 return; 788 787 } … … 893 892 LogFlow((DEVICE_NAME ":vboxNetFltPortOsXmit pThis=%p cbData=%d\n", pThis, MBLKL(pMsg))); 894 893 895 mac_tx(pThis->u.s.hClient, pMsg, 0 /* Hint */, MAC_DROP_ON_NO_DESC, NULL /* return message */); 896 return VINF_SUCCESS; 894 mac_tx_cookie_t pXmitCookie = mac_tx(pThis->u.s.hClient, pMsg, 0 /* Hint */, MAC_DROP_ON_NO_DESC, NULL /* return message */); 895 if (RT_LIKELY(!pXmitCookie)) 896 return VINF_SUCCESS; 897 898 pMsg = NULL; 899 rc = VERR_NET_IO_ERROR; 900 LogFlow((DEVICE_NAME ":vboxNetFltPortOsXmit Xmit failed.\n")); 897 901 } 898 902 else
Note:
See TracChangeset
for help on using the changeset viewer.