[ovs-dev] [PATCH 8/9 v2] datpath-windows: fix the dp index check in ValidateNetlinkCmd()

Samuel Ghinet sghinet at cloudbasesolutions.com
Fri Aug 29 10:48:53 UTC 2014


Nithin,

This patch goes: Not acked-by: Samuel Ghinet <sghinet at cloudbasesolutions.com>

Regards,
Sam
________________________________________
Date: Fri, 29 Aug 2014 01:15:20 -0700
From: Nithin Raju <nithin at vmware.com>
To: dev at openvswitch.org
Subject: [ovs-dev] [PATCH 8/9 v2] datpath-windows: fix the dp index
        check in        ValidateNetlinkCmd()
Message-ID: <1409300121-13568-8-git-send-email-nithin at vmware.com>

Also renamed the validateDp boolean to a more meaningful name.

Signed-off-by: Nithin Raju <nithin at vmware.com>
Acked-by: Ankur Sharma <ankursharma at vmware.com>
Acked-by: Samuel Ghinet <sghinet at cloudbasesolutions.com>
---
 datapath-windows/ovsext/Datapath.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/datapath-windows/ovsext/Datapath.c b/datapath-windows/ovsext/Datapath.c
index 417f463..943e6f9 100644
--- a/datapath-windows/ovsext/Datapath.c
+++ b/datapath-windows/ovsext/Datapath.c
@@ -71,7 +71,7 @@ typedef struct _NETLINK_CMD {
     UINT16 cmd;
     NetlinkCmdHandler handler;
     UINT32 supportedDevOp;      /* Supported device operations. */
-    BOOLEAN validateDp;         /* Does command require a valid DP argument. */
+    BOOLEAN validateDpIndex;    /* Does command require a valid DP argument. */
 } NETLINK_CMD, *PNETLINK_CMD;

 /* A netlink family is a group of commands. */
@@ -726,9 +726,9 @@ ValidateNetlinkCmd(UINT32 devOp,
             }

             /* Validate the DP for commands that require a DP. */
-            if (nlFamilyOps->cmds[i].validateDp == TRUE) {
+            if (nlFamilyOps->cmds[i].validateDpIndex == TRUE) {
                 OvsAcquireCtrlLock();
-                if (ovsMsg->ovsHdr.dp_ifindex ==
+                if (ovsMsg->ovsHdr.dp_ifindex !=
                     (INT)gOvsSwitchContext->dpNo) {
                     status = STATUS_INVALID_PARAMETER;
                     OvsReleaseCtrlLock();
--
1.7.4.1




More information about the dev mailing list