From 4eb67d3f063b7631860dafd258124e18b3621bd5 Mon Sep 17 00:00:00 2001 From: Sairam Venugopal Date: Mon, 12 Sep 2016 11:50:27 -0700 Subject: [PATCH] datapath-windows: Fix conntrack event handler Fix an issue with the OvsReadEventCmdHandler when handling conntrack events. Driver initiated messages should have zero seq number. Reverting the previous review comment since the inputBuffer in this case will be NULL. Signed-off-by: Sairam Venugopal Acked-by: Nithin Raju Signed-off-by: Gurucharan Shetty --- datapath-windows/ovsext/Datapath.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-windows/ovsext/Datapath.c index 745cdb695ac..83d996e8751 100644 --- a/datapath-windows/ovsext/Datapath.c +++ b/datapath-windows/ovsext/Datapath.c @@ -1673,7 +1673,6 @@ OvsReadEventCmdHandler(POVS_USER_PARAMS_CONTEXT usrParamsCtx, UINT32 *replyLen) { POVS_MESSAGE msgOut = (POVS_MESSAGE)usrParamsCtx->outputBuffer; - POVS_MESSAGE msgIn = (POVS_MESSAGE)usrParamsCtx->inputBuffer; POVS_OPEN_INSTANCE instance = (POVS_OPEN_INSTANCE)usrParamsCtx->ovsInstance; NL_BUFFER nlBuf; @@ -1708,11 +1707,12 @@ OvsReadEventCmdHandler(POVS_USER_PARAMS_CONTEXT usrParamsCtx, goto cleanup; } + /* Driver intiated messages should have zero seq number */ status = OvsCreateNlMsgFromCtEntry(&ctEventEntry.entry, usrParamsCtx->outputBuffer, usrParamsCtx->outputLength, ctEventEntry.type, - msgIn->nlMsg.nlmsgSeq, + 0, /* No input msg */ usrParamsCtx->ovsInstance->pid, NFNETLINK_V0, gOvsSwitchContext->dpNo);