VirtualBox

Changeset 28219 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 12, 2010 4:51:18 PM (15 years ago)
Author:
vboxsync
Message:

VBoxNetFlt-linux.c: Another try...

File:
1 edited

Legend:

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

    r28208 r28219  
    543543        struct skb_shared_info *pShInfo = skb_shinfo(pPkt);
    544544
    545         if (!fDstWire)
    546             fGsoType |= SKB_GSO_DODGY;
    547         pShInfo->gso_type = fGsoType;
     545        pShInfo->gso_type = fGsoType | SKB_GSO_DODGY;
    548546        pShInfo->gso_size = pSG->GsoCtx.cbMaxSeg;
    549547        pShInfo->gso_segs = PDMNetGsoCalcSegmentCount(&pSG->GsoCtx, pSG->cbTotal);
     
    553551            Assert(skb_headlen(pPkt) >= pSG->GsoCtx.cbHdrs);
    554552            pPkt->ip_summed  = CHECKSUM_PARTIAL;
     553# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
    555554            pPkt->csum_start = skb_headroom(pPkt) + pSG->GsoCtx.offHdr2;
    556555            if (fGsoType & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))
     
    558557            else
    559558                pPkt->csum_offset = RT_OFFSETOF(RTNETUDP, uh_sum);
     559# else
     560            pPkt->h.raw = skb->data + pSG->GsoCtx.offHdr2;
     561            if (fGsoType & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6))
     562                pPkt->csum = RT_OFFSETOF(RTNETTCP, th_sum);
     563            else
     564                pPkt->csum = RT_OFFSETOF(RTNETUDP, uh_sum);
     565# endif
    560566        }
    561567        else
    562568        {
    563569            pPkt->ip_summed = CHECKSUM_UNNECESSARY;
     570            pPkt->csum      = 0;
    564571            PDMNetGsoPrepForDirectUse(&pSG->GsoCtx, pPkt->data, pSG->cbTotal, false /*fPayloadChecksum*/);
    565572        }
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