Message ID | 20170714044033.15196-36-aserdean@cloudbasesolutions.com |
---|---|
State | Accepted |
Headers | show |
diff --git a/datapath-windows/ovsext/NetProto.h b/datapath-windows/ovsext/NetProto.h index 92d6611..9a17dee 100644 --- a/datapath-windows/ovsext/NetProto.h +++ b/datapath-windows/ovsext/NetProto.h @@ -68,7 +68,7 @@ typedef UINT64 IP4FragUnitLength; // length UINT for ipv6 header length. typedef UINT64 IP6UnitLength; -#define TCP_HDR_LEN(tcph) IP4_UNITS_TO_BYTES((tcph)->doff) +#define TCP_HDR_LEN(tcph) ((tcph)->doff * 4) #define TCP_DATA_LENGTH(iph, tcph) (ntohs(iph->tot_len) - \ IP4_HDR_LEN(iph) - TCP_HDR_LEN(tcph))
Using the shift operator in macros makes the static analyzer on WDK 8.1 confused. Switch to multiplication when trying to get the data offset of the TCP header. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> --- datapath-windows/ovsext/NetProto.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)