VirtualBox

Ignore:
Timestamp:
Oct 7, 2015 5:15:00 PM (9 years ago)
Author:
vboxsync
Message:

VBoxNetFlt/darwin: code to set MBUF_PROMISC on packets we send to host
if they reached us because intnet is in promiscuous mode. It's an
#if0'ed reminder for now since we don't actually request promiscuous
mode from intnet.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/VBoxNetFlt/darwin/VBoxNetFlt-darwin.cpp

    r57912 r58107  
    11901190                mbuf_adj(pMBuf, cbEthHdr);              /* move to payload */
    11911191
     1192#if 0 /* XXX: disabled since we don't request promiscuous from intnet */
     1193                /*
     1194                 * TODO: Since intnet knows whether it forwarded us
     1195                 * this packet because it's for us or because we are
     1196                 * promiscuous, it can perhaps set a flag for us in
     1197                 * INTNETSG::fFlags so that we don't have to re-check
     1198                 * it here.
     1199                 */
     1200                PCRTNETETHERHDR pcEthHdr = (PCRTNETETHERHDR)pvEthHdr;
     1201                if (   (pcEthHdr->DstMac.au8[0] & 1) == 0 /* unicast? */
     1202                    && memcmp(&pcEthHdr->DstMac, &pThis->u.s.MacAddr, sizeof(RTMAC)) != 0)
     1203                {
     1204                    mbuf_setflags_mask(pMBuf, MBUF_PROMISC, MBUF_PROMISC);
     1205                }
     1206#endif
     1207
    11921208                bpf_tap_in(pIfNet, DLT_EN10MB, pMBuf, pvEthHdr, cbEthHdr);
    11931209                errno_t err = ifnet_input(pIfNet, pMBuf, &stats);
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