Changeset 38408 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt
- Timestamp:
- Aug 10, 2011 8:07:04 PM (13 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxNetFlt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h
r38370 r38408 24 24 #include <iprt/assert.h> 25 25 26 /* Copied from VBoxNetAdp/VBoxNetAdpInternal.h */27 #define VBOXNETADP_MAGIC 0x56424e4128 26 29 27 RT_C_DECLS_BEGIN -
trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp
r38370 r38408 787 787 * @param fSrc Where the packet (allegedly) comes from, one INTNETTRUNKDIR_* value. 788 788 * @param eProtocol The protocol. 789 * @param pIfNet The network interface.790 789 */ 791 790 static errno_t vboxNetFltDarwinIffInputOutputWorker(PVBOXNETFLTINS pThis, mbuf_t pMBuf, void *pvFrame, 792 uint32_t fSrc, protocol_family_t eProtocol, 793 ifnet_t pIfNet) 791 uint32_t fSrc, protocol_family_t eProtocol) 794 792 { 795 793 /* … … 842 840 { 843 841 /* 844 * Check i s this interface belongs to vboxnetadp. We should not drop845 * any packets before they get to vboxnetadpas it passes them to tap842 * Check if this interface is in promiscuous mode. We should not drop 843 * any packets before they get to the driver as it passes them to tap 846 844 * callbacks in order for BPF to work properly. 847 845 */ 848 uint32_t *pMagic = (uint32_t *)ifnet_softc(pIfNet); 849 Log2(("vboxnetflt: pMagic=%p *pMagic=%x\n", pMagic, pMagic ? *pMagic : -1)); 850 if (pMagic && *pMagic == VBOXNETADP_MAGIC) 846 if (vboxNetFltDarwinIsPromiscuous(pThis)) 851 847 fDropIt = false; 852 848 else … … 871 867 872 868 NOREF(eProtocol); 873 return vboxNetFltDarwinIffInputOutputWorker((PVBOXNETFLTINS)pvThis, *ppMBuf, NULL, INTNETTRUNKDIR_HOST, eProtocol, pIfNet); 869 NOREF(pIfNet); 870 return vboxNetFltDarwinIffInputOutputWorker((PVBOXNETFLTINS)pvThis, *ppMBuf, NULL, INTNETTRUNKDIR_HOST, eProtocol); 874 871 } 875 872 … … 883 880 { 884 881 NOREF(eProtocol); 885 return vboxNetFltDarwinIffInputOutputWorker((PVBOXNETFLTINS)pvThis, *ppMBuf, *ppchFrame, INTNETTRUNKDIR_WIRE, eProtocol, pIfNet); 882 NOREF(pIfNet); 883 return vboxNetFltDarwinIffInputOutputWorker((PVBOXNETFLTINS)pvThis, *ppMBuf, *ppchFrame, INTNETTRUNKDIR_WIRE, eProtocol); 886 884 } 887 885
Note:
See TracChangeset
for help on using the changeset viewer.