datapath-windows: Fix payload length calculation in Conntrack.h
The payload calculation in OvsGetTcpHeader is wrong:
`ntohs(ipHdr->tot_len) - expr` instead of `ntohs((ipHdr->tot_len) - expr)`.
We already have a macro for that calculation defined in NetProto.h so use it.
Acked-by: Anand Kumar
@@ -187,8 +187,7 @@ OvsGetTcpHeader(PNET_BUFFER_LIST nbl,
tcp = (TCPHdr *)((PCHAR)ipHdr + ipHdr->ihl * 4);
if (tcp->doff * 4 >= sizeof *tcp) {
NdisMoveMemory(dest, tcp, sizeof(TCPHdr));
- *tcpPayloadLen = ntohs((ipHdr->tot_len) - (ipHdr->ihl * 4) -
- (TCP_HDR_LEN(tcp)));
+ *tcpPayloadLen = TCP_DATA_LENGTH(ipHdr, tcp);
return storage;
}
