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