VirtualBox

Ignore:
Timestamp:
Dec 11, 2009 1:40:55 PM (15 years ago)
Author:
vboxsync
Message:

Solaris/VBoxBow: bits.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c

    r25312 r25327  
    6262# define LOCAL      static
    6363
    64 #define DEBUG_ramshankar
    6564#if defined(DEBUG_ramshankar)
    6665# undef Log
     
    584583}
    585584
     585
    586586/**
    587587 * Receive (rx) entry point.
     
    595595LOCAL void vboxNetFltSolarisRecv(void *pvData, mac_resource_handle_t hResource, mblk_t *pMsg, boolean_t fLoopback)
    596596{
    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));
    598598
    599599    PVBOXNETFLTINS pThis = (PVBOXNETFLTINS)pvData;
     
    615615    uint32_t fSrc = INTNETTRUNKDIR_WIRE;
    616616    PRTNETETHERHDR pEthHdr = (PRTNETETHERHDR)pMsg->b_rptr;
    617     if (vboxNetFltPortOsIsHostMac(pThis, &pEthHdr->SrcMac))
     617    if (   MBLKL(pMsg) >= sizeof(RTNETETHERHDR)
     618        && vboxNetFltPortOsIsHostMac(pThis, &pEthHdr->SrcMac))
    618619        fSrc = INTNETTRUNKDIR_HOST;
    619 
    620     vboxNetFltSolarisAnalyzeMBlk(pMsg);
    621620
    622621    /*
     
    777776{
    778777    LogFlow((DEVICE_NAME ":vboxNetFltPortOsIsPromiscuous pThis=%p\n", pThis));
    779     return pThis->u.s.hPromiscuous ? true : false;
     778    return false;
    780779}
    781780
     
    784783{
    785784    LogFlow((DEVICE_NAME ":vboxNetFltPortOsGetMacAddress pThis=%p\n", pThis));
    786     NOREF(pThis); NOREF(pMac);
     785    *pMac = pThis->u.s.Mac;
    787786    return;
    788787}
     
    893892            LogFlow((DEVICE_NAME ":vboxNetFltPortOsXmit pThis=%p cbData=%d\n", pThis, MBLKL(pMsg)));
    894893
    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"));
    897901        }
    898902        else
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