datapath-windows: fix NULL check in OvsGetExtInfoIoctl()
authorNithin Raju <nithin@vmware.com>
Mon, 19 Oct 2015 22:15:40 +0000 (15:15 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Wed, 21 Oct 2015 23:27:27 +0000 (16:27 -0700)
End result is that "mac_in_use" column gets populated in
OVSDB for internal and external NICs.

Signed-off-by: Nithin Raju <nithin@vmware.com>
Acked-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Acked-by: Sairam Venugopal <vsairam@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
datapath-windows/ovsext/Vport.c

index baab056..4ade842 100644 (file)
@@ -1542,7 +1542,7 @@ OvsGetExtInfoIoctl(POVS_VPORT_GET vportGet,
     if (vportGet->portNo == 0) {
         StringCbLengthA(vportGet->name, OVS_MAX_PORT_NAME_LENGTH - 1, &len);
         vport = OvsFindVportByHvNameA(gOvsSwitchContext, vportGet->name);
-        if (vport != NULL) {
+        if (vport == NULL) {
             /* If the port is not a Hyper-V port and it has been added earlier,
              * we'll find it in 'ovsPortNameHashArray'. */
             vport = OvsFindVportByOvsName(gOvsSwitchContext, vportGet->name);