Changeset 21076 in vbox for trunk/src/VBox
- Timestamp:
- Jun 30, 2009 3:19:04 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
r19884 r21076 2863 2863 } 2864 2864 2865 LogFlow((DEVICE_NAME ":vboxNetFltSolarisIsOurMBlk returns %d.\n", fIsOurPacket)); 2865 2866 RTSemFastMutexRelease(pThis->u.s.hFastMtx); 2866 2867 return fIsOurPacket; … … 2894 2895 * Don't loopback packets we transmit to the wire. 2895 2896 */ 2896 /** @todo maybe we need not check for loopback for INTNETTRUNKDIR_HOST case? */2897 2897 if (vboxNetFltSolarisIsOurMBlk(pThis, pPromiscStream, pMsg)) 2898 2898 { 2899 2899 LogFlow((DEVICE_NAME ":Avoiding packet loopback.\n")); 2900 2900 return VINF_SUCCESS; 2901 } 2902 2903 /* 2904 * Paranoia... 2905 */ 2906 if (MBLKL(pMsg) < sizeof(RTNETETHERHDR)) 2907 { 2908 size_t cbMsg = msgdsize(pMsg); 2909 if (cbMsg < sizeof(RTNETETHERHDR)) 2910 return VINF_SUCCESS; 2911 2912 mblk_t *pFullMsg = allocb(cbMsg, BPRI_MED); 2913 if (RT_LIKELY(pFullMsg)) 2914 { 2915 mblk_t *pCur = pMsg; 2916 while (pCur) 2917 { 2918 size_t cbBlock = MBLKL(pCur); 2919 if (cbBlock > 0) 2920 { 2921 bcopy(pCur->b_rptr, pFullMsg->b_wptr, cbBlock); 2922 pFullMsg->b_wptr += cbBlock; 2923 } 2924 pCur = pCur->b_cont; 2925 } 2926 2927 freemsg(pMsg); 2928 pMsg = pFullMsg; 2929 } 2930 else 2931 return VERR_NO_MEMORY; 2901 2932 } 2902 2933
Note:
See TracChangeset
for help on using the changeset viewer.