From patchwork Wed Feb 8 06:41:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alin Serdean X-Patchwork-Id: 725504 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vJBTb2sNgz9s7c for ; Wed, 8 Feb 2017 17:42:27 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 7C688B92; Wed, 8 Feb 2017 06:41:28 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id AA093B78 for ; Wed, 8 Feb 2017 06:41:27 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.cloudbasesolutions.com (mail.cloudbasesolutions.com [91.232.152.5]) by smtp1.linuxfoundation.org (Postfix) with ESMTP id D649016A for ; Wed, 8 Feb 2017 06:41:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.cloudbasesolutions.com (Postfix) with ESMTP id F11F24006D for ; Wed, 8 Feb 2017 08:41:25 +0200 (EET) X-Virus-Scanned: amavisd-new at cloudbasesolutions.com Received: from mail.cloudbasesolutions.com ([127.0.0.1]) by localhost (mail.cloudbasesolutions.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ssklBmNiGGen for ; Wed, 8 Feb 2017 08:41:25 +0200 (EET) Received: from mail.cloudbasesolutions.com (unknown [10.77.78.3]) by mail.cloudbasesolutions.com (Postfix) with ESMTP id 98A9740000 for ; Wed, 8 Feb 2017 08:41:25 +0200 (EET) Received: from CBSEX1.cloudbase.local ([10.77.78.3]) by CBSEX1.cloudbase.local ([10.77.78.3]) with mapi id 14.03.0319.002; Wed, 8 Feb 2017 07:41:25 +0100 From: Alin Serdean To: "dev@openvswitch.org" Thread-Topic: [PATCH] windows: netdev report error if query failed Thread-Index: AQHSgdZdlcepigMBwkWY8GKALm3mQw== Date: Wed, 8 Feb 2017 06:41:24 +0000 Message-ID: <20170208064112.2360-1-aserdean@cloudbasesolutions.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-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH] windows: netdev report error if query failed X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The netdev Windows construct uses query_netdev to see if a port exists in the datapath, in the case an error occurred in the reply message we returned 0, meaning netdev_open was successful. This patch fixes fixes that problem. Reported-at: https://github.com/openvswitch/ovs-issues/issues/125 Reported-by: Shashank Ram Signed-off-by: Alin Gabriel Serdean --- intended for: branch-2.5, branch-2.6, branch-2.7, master --- lib/netdev-windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-windows.c b/lib/netdev-windows.c index c2fbe42..b22bd09 100644 --- a/lib/netdev-windows.c +++ b/lib/netdev-windows.c @@ -295,7 +295,7 @@ query_netdev(const char *devname, } } - return 0; + return error; } static void