Changeset 73097 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
- Timestamp:
- Jul 12, 2018 9:06:33 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
r70708 r73097 653 653 else if (pSG->cbTotal >= sizeof(RTNETETHERHDR)) 654 654 { 655 uint32_t off = RT_ OFFSETOF(RTNETETHERHDR, EtherType);655 uint32_t off = RT_UOFFSETOF(RTNETETHERHDR, EtherType); 656 656 uint32_t i; 657 657 for (i = 0; i < pSG->cSegsUsed; ++i) … … 768 768 pPkt->csum_start = skb_headroom(pPkt) + pSG->GsoCtx.offHdr2; 769 769 if (fGsoType & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) 770 pPkt->csum_offset = RT_ OFFSETOF(RTNETTCP, th_sum);770 pPkt->csum_offset = RT_UOFFSETOF(RTNETTCP, th_sum); 771 771 else 772 pPkt->csum_offset = RT_ OFFSETOF(RTNETUDP, uh_sum);772 pPkt->csum_offset = RT_UOFFSETOF(RTNETUDP, uh_sum); 773 773 # else 774 774 pPkt->h.raw = pPkt->data + pSG->GsoCtx.offHdr2; 775 775 if (fGsoType & (SKB_GSO_TCPV4 | SKB_GSO_TCPV6)) 776 pPkt->csum = RT_ OFFSETOF(RTNETTCP, th_sum);776 pPkt->csum = RT_UOFFSETOF(RTNETTCP, th_sum); 777 777 else 778 pPkt->csum = RT_ OFFSETOF(RTNETUDP, uh_sum);778 pPkt->csum = RT_UOFFSETOF(RTNETUDP, uh_sum); 779 779 # endif 780 780 if (!fDstWire) … … 1457 1457 unsigned cbExtra; 1458 1458 unsigned cSegs = vboxNetFltLinuxCalcSGSegments(pSkb, &cbExtra); 1459 PINTNETSG pSG = (PINTNETSG)alloca(RT_ OFFSETOF(INTNETSG, aSegs[cSegs]) + cbExtra);1459 PINTNETSG pSG = (PINTNETSG)alloca(RT_UOFFSETOF_DYN(INTNETSG, aSegs[cSegs]) + cbExtra); 1460 1460 if (RT_LIKELY(pSG)) 1461 1461 { … … 1491 1491 unsigned cbExtra; 1492 1492 unsigned cSegs = vboxNetFltLinuxCalcSGSegments(pBuf, &cbExtra); 1493 PINTNETSG pSG = (PINTNETSG)alloca(RT_ OFFSETOF(INTNETSG, aSegs[cSegs]) + cbExtra);1493 PINTNETSG pSG = (PINTNETSG)alloca(RT_UOFFSETOF_DYN(INTNETSG, aSegs[cSegs]) + cbExtra); 1494 1494 if (RT_LIKELY(pSG)) 1495 1495 {
Note:
See TracChangeset
for help on using the changeset viewer.