From patchwork Tue Oct 20 10:25:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sorin Vinturis X-Patchwork-Id: 532876 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (li376-54.members.linode.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 388201402B2 for ; Tue, 20 Oct 2015 21:27:22 +1100 (AEDT) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id DAC7D10665; Tue, 20 Oct 2015 03:27:20 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 4A0EB10650 for ; Tue, 20 Oct 2015 03:27:19 -0700 (PDT) Received: from bar2.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id 689F3420204 for ; Tue, 20 Oct 2015 04:27:18 -0600 (MDT) X-ASG-Debug-ID: 1445336836-03dc53030710ae0001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar2.cudamail.com with ESMTP id czD0Fb9fHJvdup7k (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 20 Oct 2015 04:27:16 -0600 (MDT) X-Barracuda-Envelope-From: svinturis@cloudbasesolutions.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO cbssmtp1.cloudbase.local) (91.232.152.5) by mx1-pf1.cudamail.com with SMTP; 20 Oct 2015 10:27:15 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at cloudbasesolutions.com designates 91.232.152.5 as permitted sender) X-Barracuda-Apparent-Source-IP: 91.232.152.5 X-Barracuda-RBL-IP: 91.232.152.5 Received: from localhost (localhost [127.0.0.1]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id 086634239B; Tue, 20 Oct 2015 13:27:14 +0300 (EEST) X-Virus-Scanned: amavisd-new at cloudbasesolutions.com Received: from cbssmtp1.cloudbase.local ([127.0.0.1]) by localhost (cbssmtp1.cloudbase.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RVKuXmiTTHA0; Tue, 20 Oct 2015 13:26:53 +0300 (EEST) Received: from CBSEX1.cloudbase.local (unknown [10.77.78.3]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id CA8D742397; Tue, 20 Oct 2015 13:25:04 +0300 (EEST) Received: from CBSEX1.cloudbase.local ([10.77.78.3]) by CBSEX1.cloudbase.local ([10.77.78.3]) with mapi id 14.03.0224.002; Tue, 20 Oct 2015 12:25:04 +0200 X-CudaMail-Envelope-Sender: svinturis@cloudbasesolutions.com From: Sorin Vinturis To: Nithin Raju , "dev@openvswitch.org" X-CudaMail-MID: CM-E1-1019010285 X-CudaMail-DTE: 102015 X-CudaMail-Originating-IP: 91.232.152.5 Thread-Topic: [ovs-dev] [PATCH] datapath-windows: fix NULL check in OvsGetExtInfoIoctl() X-ASG-Orig-Subj: [##CM-E1-1019010285##]RE: [ovs-dev] [PATCH] datapath-windows: fix NULL check in OvsGetExtInfoIoctl() Thread-Index: AQHRCrvImEmon/+YyUS2vl/HpxYQJp50LZtQ Date: Tue, 20 Oct 2015 10:25:04 +0000 Message-ID: References: <1445292940-18062-1-git-send-email-nithin@vmware.com> In-Reply-To: <1445292940-18062-1-git-send-email-nithin@vmware.com> Accept-Language: en-US, it-IT Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.77.78.1] MIME-Version: 1.0 X-GBUdb-Analysis: 0, 91.232.152.5, Ugly c=0.303425 p=-0.368421 Source Normal X-MessageSniffer-Rules: 0-0-0-3562-c X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1445336836 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.10 X-Barracuda-Spam-Status: No, SCORE=0.10 using per-user scores of TAG_LEVEL=3.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=3.0 tests=RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.23654 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS Subject: Re: [ovs-dev] [PATCH] datapath-windows: fix NULL check in OvsGetExtInfoIoctl() X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" Acked-by: Sorin Vinturis -----Original Message----- From: dev [mailto:dev-bounces@openvswitch.org] On Behalf Of Nithin Raju Sent: Tuesday, 20 October, 2015 01:16 To: dev@openvswitch.org Subject: [ovs-dev] [PATCH] datapath-windows: fix NULL check in OvsGetExtInfoIoctl() End result is that "mac_in_use" column gets populated in OVSDB for internal and external NICs. Signed-off-by: Nithin Raju --- datapath-windows/ovsext/Vport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.8.5.6 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev diff --git a/datapath-windows/ovsext/Vport.c b/datapath-windows/ovsext/Vport.c index baab056..4ade842 100644 --- a/datapath-windows/ovsext/Vport.c +++ b/datapath-windows/ovsext/Vport.c @@ -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);