Changeset 57846 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Sep 21, 2015 7:50:36 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp
r57358 r57846 3491 3491 3492 3492 /* Patch UDP checksum */ 3493 uint32_t uChecksum = (uint32_t)~pUdpHdr->uh_sum + RT_H2BE_U16_C(RTNET_DHCP_FLAG_BROADCAST); 3494 while (uChecksum >> 16) 3495 uChecksum = (uChecksum >> 16) + (uChecksum & 0xFFFF); 3496 uChecksum = ~uChecksum; 3497 intnetR0SgWritePart(pSG, (uintptr_t)&pUdpHdr->uh_sum - (uintptr_t)pIpHdr + sizeof(RTNETETHERHDR), sizeof(pUdpHdr->uh_sum), &uChecksum); 3493 if (pUdpHdr->uh_sum != 0) 3494 { 3495 uint32_t uChecksum = (uint32_t)~pUdpHdr->uh_sum + RT_H2BE_U16_C(RTNET_DHCP_FLAG_BROADCAST); 3496 while (uChecksum >> 16) 3497 uChecksum = (uChecksum >> 16) + (uChecksum & 0xFFFF); 3498 uChecksum = ~uChecksum; 3499 intnetR0SgWritePart(pSG, 3500 (uintptr_t)&pUdpHdr->uh_sum - (uintptr_t)pIpHdr + sizeof(RTNETETHERHDR), 3501 sizeof(pUdpHdr->uh_sum), 3502 &uChecksum); 3503 } 3498 3504 } 3499 3505
Note:
See TracChangeset
for help on using the changeset viewer.