Skip to content

Commit

Permalink
datapath-windows: Conntrack, Add check for TCP header extraction
Browse files Browse the repository at this point in the history
Add an additional check before trying to look at the TCP header.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
  • Loading branch information
Alin Gabriel Serdean committed Aug 30, 2020
1 parent d532e64 commit 6c45b67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datapath-windows/ovsext/Conntrack.h
Expand Up @@ -178,7 +178,7 @@ OvsGetTcpHeader(PNET_BUFFER_LIST nbl,
ipHdr = NdisGetDataBuffer(NET_BUFFER_LIST_FIRST_NB(nbl),
layers->l4Offset + sizeof(TCPHdr),
NULL, 1 /*no align*/, 0);
if (ipHdr == NULL) {
if (ipHdr == NULL || !layers->isTcp) {
return NULL;
}

Expand Down

0 comments on commit 6c45b67

Please sign in to comment.