Changeset 90804 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt
- Timestamp:
- Aug 23, 2021 7:08:53 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 146439
- Location:
- trunk/src/VBox/HostDrivers/VBoxNetFlt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
r85344 r90804 752 752 uint64_t NanoTS = RTTimeSystemNanoTS(); 753 753 LogFlow(("vboxNetFltDarwinIffDetached: pThis=%p NanoTS=%RU64 (%d)\n", 754 pThis, NanoTS, VALID_PTR(pIfNet) ? VBOX_GET_PCOUNT(pIfNet) : -1));754 pThis, NanoTS, RT_VALID_PTR(pIfNet) ? VBOX_GET_PCOUNT(pIfNet) : -1)); 755 755 756 756 Assert(!pThis->fDisconnectedFromHost); … … 771 771 772 772 pIfNet = ASMAtomicUoReadPtrT(&pThis->u.s.pIfNet, ifnet_t); 773 int cPromisc = VALID_PTR(pIfNet) ? VBOX_GET_PCOUNT(pIfNet) : - 1;773 int cPromisc = RT_VALID_PTR(pIfNet) ? VBOX_GET_PCOUNT(pIfNet) : - 1; 774 774 775 775 ASMAtomicUoWriteNullPtr(&pThis->u.s.pIfNet); … … 836 836 * Watch out for the interface going online / offline. 837 837 */ 838 if ( 839 && 840 && 841 && 842 && 838 if ( RT_VALID_PTR(pThis) 839 && RT_VALID_PTR(pEvMsg) 840 && pEvMsg->vendor_code == KEV_VENDOR_APPLE 841 && pEvMsg->kev_class == KEV_NETWORK_CLASS 842 && pEvMsg->kev_subclass == KEV_DL_SUBCLASS) 843 843 { 844 844 if (pThis->u.s.pIfNet == pIfNet) … … 881 881 } 882 882 else 883 Log(("vboxNetFltDarwinIffEvent: pThis->u.s.pIfNet=%p pIfNet=%p (%d)\n", pThis->u.s.pIfNet, pIfNet, VALID_PTR(pIfNet) ? VBOX_GET_PCOUNT(pIfNet) : -1));884 } 885 else if ( VALID_PTR(pEvMsg))883 Log(("vboxNetFltDarwinIffEvent: pThis->u.s.pIfNet=%p pIfNet=%p (%d)\n", pThis->u.s.pIfNet, pIfNet, RT_VALID_PTR(pIfNet) ? VBOX_GET_PCOUNT(pIfNet) : -1)); 884 } 885 else if (RT_VALID_PTR(pEvMsg)) 886 886 Log(("vboxNetFltDarwinIffEvent: vendor_code=%#x kev_class=%#x kev_subclass=%#x event_code=%#x\n", 887 887 pEvMsg->vendor_code, pEvMsg->kev_class, pEvMsg->kev_subclass, pEvMsg->event_code)); -
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
r90249 r90804 403 403 * careful here and avoid the race. 404 404 */ 405 if ( ! VALID_PTR(pOverride)405 if ( !RT_VALID_PTR(pOverride) 406 406 || pOverride->u32Magic != VBOXNETDEVICEOPSOVERRIDE_MAGIC 407 407 # if RTLNX_VER_MIN(2,6,29) 408 || ! VALID_PTR(pOverride->pOrgOps)409 # endif /* RTLNX_VER_MIN(2,6,29) */408 || !RT_VALID_PTR(pOverride->pOrgOps) 409 # endif 410 410 ) 411 411 { … … 427 427 pEtherHdr = (PCRTNETETHERHDR)skb_header_pointer(pSkb, 0, cbHdrs, &abHdrBuf[0]); 428 428 if ( pEtherHdr 429 && VALID_PTR(pOverride->pVBoxNetFlt)429 && RT_VALID_PTR(pOverride->pVBoxNetFlt) 430 430 && (pSwitchPort = pOverride->pVBoxNetFlt->pSwitchPort) != NULL 431 && VALID_PTR(pSwitchPort)431 && RT_VALID_PTR(pSwitchPort) 432 432 && cbHdrs >= 6) 433 433 { … … 458 458 459 459 /* Cancel override if ethtool_ops is missing (host-only case, @bugref{5712}) */ 460 if (! VALID_PTR(pDev->OVR_OPS))460 if (!RT_VALID_PTR(pDev->OVR_OPS)) 461 461 return; 462 462 pOverride = RTMemAlloc(sizeof(*pOverride)); … … 497 497 if (!pDev) 498 498 pDev = ASMAtomicUoReadPtrT(&pThis->u.s.pDev, struct net_device *); 499 if ( VALID_PTR(pDev))499 if (RT_VALID_PTR(pDev)) 500 500 { 501 501 pOverride = (PVBOXNETDEVICEOPSOVERRIDE)pDev->OVR_OPS; 502 if ( 503 && 504 && 502 if ( RT_VALID_PTR(pOverride) 503 && pOverride->u32Magic == VBOXNETDEVICEOPSOVERRIDE_MAGIC 504 && RT_VALID_PTR(pOverride->pOrgOps) 505 505 ) 506 506 { -
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFltBow-solaris.c
r90785 r90804 722 722 723 723 PVBOXNETFLTINS pThis = pvArg; 724 Assert ReturnVoid(VALID_PTR(pThis));725 Assert ReturnVoid(pThis->u.s.hInterface);724 AssertPtrReturnVoid(pThis); 725 AssertPtrReturnVoid(pThis->u.s.hInterface); 726 726 727 727 switch (Type) … … 1475 1475 */ 1476 1476 PVBOXNETFLTVNIC pVNIC = pvIfData; 1477 Assert MsgReturnVoid(VALID_PTR(pVNIC) && pVNIC->u32Magic == VBOXNETFLTVNIC_MAGIC,1478 ("Invalid pVNIC=%p magic=%#x (expected %#x)\n", pvIfData,1479 VALID_PTR(pVNIC) ? pVNIC->u32Magic : 0, VBOXNETFLTVNIC_MAGIC));1477 AssertPtrReturnVoid(pVNIC); 1478 AssertMsgReturnVoid(pVNIC->u32Magic == VBOXNETFLTVNIC_MAGIC, 1479 ("Invalid pVNIC=%p magic=%#x (expected %#x)\n", pvIfData, pVNIC->u32Magic, VBOXNETFLTVNIC_MAGIC)); 1480 1480 AssertMsgReturnVoid(pVNIC->hLinkId != DATALINK_INVALID_LINKID, 1481 ("Invalid hLinkId pVNIC=%p magic=%#x\n", pVNIC, pVNIC->u32Magic));1481 ("Invalid hLinkId pVNIC=%p magic=%#x\n", pVNIC, pVNIC->u32Magic)); 1482 1482 1483 1483 /*
Note:
See TracChangeset
for help on using the changeset viewer.