[ovs-dev] [PATCH 5/5 v2] datapath-windows: fix return value in conntrack

Alin Serdean aserdean at cloudbasesolutions.com
Thu Oct 27 18:57:35 UTC 2016


'status' is of type 'NTSTATUS' and NlFillOvsMsgForNfGenMsg is of type bool.

Signed-off-by: Alin Gabriel Serdean <aserdean at cloudbasesolutions.com>
---
 datapath-windows/ovsext/Conntrack.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/datapath-windows/ovsext/Conntrack.c b/datapath-windows/ovsext/Conntrack.c
index 74fb38c..d81ef13 100644
--- a/datapath-windows/ovsext/Conntrack.c
+++ b/datapath-windows/ovsext/Conntrack.c
@@ -744,12 +744,14 @@ OvsCtDeleteCmdHandler(POVS_USER_PARAMS_CONTEXT usrParamsCtx,
         NlBufInit(&nlBuf,
                   usrParamsCtx->outputBuffer,
                   usrParamsCtx->outputLength);
-        status = NlFillOvsMsgForNfGenMsg(&nlBuf, nlmsgType, NLM_F_CREATE,
-                                         msgIn->nlMsg.nlmsgSeq,
-                                         msgIn->nlMsg.nlmsgPid,
-                                         AF_UNSPEC,
-                                         msgIn->nfGenMsg.version,
-                                         0);
+        if (!NlFillOvsMsgForNfGenMsg(&nlBuf, nlmsgType, NLM_F_CREATE,
+                                     msgIn->nlMsg.nlmsgSeq,
+                                     msgIn->nlMsg.nlmsgPid,
+                                     AF_UNSPEC,
+                                     msgIn->nfGenMsg.version,
+                                     0)) {
+            status = STATUS_INVALID_PARAMETER;
+        }
         nlMsg = (PNL_MSG_HDR)NlBufAt(&nlBuf, 0, 0);
         nlMsg->nlmsgLen = NlBufSize(&nlBuf);
         *replyLen = msgOut->nlMsg.nlmsgLen;
-- 
2.9.2.windows.1



More information about the dev mailing list