Changeset 20284 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt
- Timestamp:
- Jun 4, 2009 1:39:58 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
r20144 r20284 658 658 { 659 659 if (pBuf->ip_summed == CHECKSUM_PARTIAL && pBuf->pkt_type == PACKET_OUTGOING) 660 { 661 #if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 18) 662 /* 663 * Try to work around the problem with CentOS 5.2 (2.6.18 kernel), 664 * it passes wrong 'h' pointer down. We take IP header length from 665 * the header itself and reconstruct 'h' pointer to TCP (or whatever) 666 * header. 667 */ 668 unsigned char *tmp = pBuf->h.raw; 669 if (pBuf->h == pBuf->nh && pBuf->protocol == htons(ETH_P_IP)) 670 pBuf->h.raw = pBuf->nh.raw + ((pBuf->nh.raw[0] & 0xF) * 4); 671 #endif /* LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 18) */ 660 672 if (VBOX_SKB_CHECKSUM_HELP(pBuf)) 661 673 { … … 664 676 return; 665 677 } 678 #if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 18) 679 /* Restore the original (wrong) pointer. */ 680 pBuf->h.raw = tmp; 681 #endif /* LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 18) */ 682 } 666 683 vboxNetFltLinuxForwardSegment(pThis, pBuf, fSrc); 667 684 }
Note:
See TracChangeset
for help on using the changeset viewer.