Changeset 87071 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Dec 9, 2020 3:24:48 PM (4 years ago)
- svn:sync-xref-src-repo-rev:
- 141840
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/DevE1000.cpp
r86574 r87071 4157 4157 * @param cse Offset in packet to stop computing 4158 4158 * checksum at. 4159 * @param fUdp Replace 0 checksum with all 1s. 4159 4160 * @thread E1000_TX 4160 4161 */ 4161 static void e1kInsertChecksum(PE1KSTATE pThis, uint8_t *pPkt, uint16_t u16PktLen, uint8_t cso, uint8_t css, uint16_t cse )4162 static void e1kInsertChecksum(PE1KSTATE pThis, uint8_t *pPkt, uint16_t u16PktLen, uint8_t cso, uint8_t css, uint16_t cse, bool fUdp = false) 4162 4163 { 4163 4164 RT_NOREF1(pThis); … … 4187 4188 4188 4189 uint16_t u16ChkSum = e1kCSum16(pPkt + css, cse - css + 1); 4190 if (fUdp && u16ChkSum == 0) 4191 u16ChkSum = ~u16ChkSum; /* 0 means no checksum computed in case of UDP (see @bugref{9883}) */ 4189 4192 E1kLog2(("%s Inserting csum: %04X at %02X, old value: %04X\n", pThis->szPrf, 4190 4193 u16ChkSum, cso, *(uint16_t*)(pPkt + cso))); … … 4912 4915 pThis->contextNormal.tu.u8CSO, 4913 4916 pThis->contextNormal.tu.u8CSS, 4914 pThis->contextNormal.tu.u16CSE); 4917 pThis->contextNormal.tu.u16CSE, 4918 !pThis->contextNormal.dw2.fTCP); 4915 4919 e1kTransmitFrame(pDevIns, pThis, pThisCC, fOnWorkerThread); 4916 4920 } … … 5107 5111 pThis->contextNormal.tu.u8CSO, 5108 5112 pThis->contextNormal.tu.u8CSS, 5109 pThis->contextNormal.tu.u16CSE); 5113 pThis->contextNormal.tu.u16CSE, 5114 !pThis->contextNormal.dw2.fTCP); 5110 5115 e1kTransmitFrame(pDevIns, pThis, pThisCC, fOnWorkerThread); 5111 5116 }
Note:
See TracChangeset
for help on using the changeset viewer.