Changeset 14547 in vbox for trunk/src/VBox/HostDrivers/VBoxNetFlt/linux
- Timestamp:
- Nov 24, 2008 9:30:16 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/linux/VBoxNetFlt-linux.c
r14508 r14547 59 59 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18) 60 60 # define VBOX_SKB_IS_GSO(skb) skb_is_gso(skb) 61 /* No features, very dumb device */ 61 62 # define VBOX_SKB_GSO_SEGMENT(skb) skb_gso_segment(skb, 0) 62 63 #else /* LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18) */ … … 494 495 static void vboxNetFltLinuxForwardToIntNet(PVBOXNETFLTINS pThis, struct sk_buff *pBuf) 495 496 { 496 struct sk_buff *pNext, *pSegment = NULL;497 497 uint32_t fSrc = pBuf->pkt_type == PACKET_OUTGOING ? INTNETTRUNKDIR_HOST : INTNETTRUNKDIR_WIRE; 498 498 … … 511 511 #endif 512 512 513 //Log2(("vboxNetFltLinuxForwardToIntNet: cb=%u gso_size=%u gso_segs=%u gso_type=%u\n",514 // pBuf->len, skb_shinfo(pBuf)->gso_size, skb_shinfo(pBuf)->gso_segs, skb_shinfo(pBuf)->gso_type));515 516 513 if (VBOX_SKB_IS_GSO(pBuf)) 517 514 { 518 515 /* Need to segment the packet */ 519 struct sk_buff *pSegments = VBOX_SKB_GSO_SEGMENT(pBuf); /* No features, very dumb device */ 520 pBuf->next = pSegments; 516 struct sk_buff *pNext, *pSegment; 517 Log2(("vboxNetFltLinuxForwardToIntNet: cb=%u gso_size=%u gso_segs=%u gso_type=%u\n", 518 pBuf->len, skb_shinfo(pBuf)->gso_size, skb_shinfo(pBuf)->gso_segs, skb_shinfo(pBuf)->gso_type)); 519 520 for (pSegment = VBOX_SKB_GSO_SEGMENT(pBuf); pSegment; pSegment = pNext) 521 { 522 pNext = pSegment->next; 523 pSegment->next = 0; 524 vboxNetFltLinuxForwardSegment(pThis, pSegment, fSrc); 525 } 526 dev_kfree_skb(pBuf); 527 } 528 else 529 { 530 if (pBuf->ip_summed == CHECKSUM_PARTIAL) 531 if (skb_checksum_help(pBuf)) 532 { 533 LogRel(("VBoxNetFlt: Failed to compute checksum, dropping the packet.\n")); 534 dev_kfree_skb(pBuf); 535 return; 536 } 537 vboxNetFltLinuxForwardSegment(pThis, pBuf, fSrc); 521 538 } 522 539 /* 523 540 * Create a (scatter/)gather list for the sk_buff and feed it to the internal network. 524 541 */ 525 for (pSegment = pBuf; pSegment; pSegment = pNext)526 {527 pNext = pSegment->next;528 pSegment->next = 0;529 vboxNetFltLinuxForwardSegment(pThis, pSegment, fSrc);530 }531 542 } 532 543
Note:
See TracChangeset
for help on using the changeset viewer.