From patchwork Thu Jun 7 14:10:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Leitner X-Patchwork-Id: 926327 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com 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 411nWS2vrvz9s01 for ; Fri, 8 Jun 2018 00:10:44 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 6590ECB0; Thu, 7 Jun 2018 14:10:42 +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 DA410CAE for ; Thu, 7 Jun 2018 14:10:41 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 7E675722 for ; Thu, 7 Jun 2018 14:10:41 +0000 (UTC) Received: by mail-qk0-f196.google.com with SMTP id g14-v6so6624761qkm.6 for ; Thu, 07 Jun 2018 07:10:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=xscKrKMfoqgUIRI84SBtdTDbn6WycGsWH7qw9dYaaaA=; b=M6OLnUf2XQEuZMLRwf6LeDV+4RT9TbSSKdWOIeoVVq/JXLI0YLTyYFkyJequrqvmQd iOfv2TU70AnQaG8Dq4m4v/hjFRKvTcQPWOnbwniezQF0Ka9//zecbzOKLeQbnycYd7bP GQwRUOY0Jdg2zm1lmXHILS1yUSsT7wdALCkWsfbvBHLCkTJlZkSnxhNAacvID2Rh650b aVOuEvT05zTEwCX5GMnmiNYeRg32llKblHPnQwcOUhi9LVO2IC4OdDCfj0v+vL3t87R0 eIXguRuk1zTLvtAr1E7TP7BHR6XjudHdlCvKgTEgxULp2lDN6vRpQqTDDuVjqz3l/12g 1kuw== X-Gm-Message-State: APt69E3vPUxl1izSVRU3W4yGPbf4Dr9qEOu69Wy6dNh+EKk612qhu4Rg 7q78IhPaCL7YrR3pDmNdnkSYLDMxJXI= X-Google-Smtp-Source: ADUXVKIdJ6NWCJn3Iwrxjf1nIXTJSlt+nSJDG6oQiAIRtRVrQYnCYiH2AGhdlrB0vCERo/6qRbEovg== X-Received: by 2002:a37:3641:: with SMTP id d62-v6mr1559440qka.419.1528380640305; Thu, 07 Jun 2018 07:10:40 -0700 (PDT) Received: from localhost ([177.183.215.231]) by smtp.gmail.com with ESMTPSA id p51-v6sm10345162qtc.43.2018.06.07.07.10.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Jun 2018 07:10:39 -0700 (PDT) From: Flavio Leitner To: dev@openvswitch.org Date: Thu, 7 Jun 2018 11:10:17 -0300 Message-Id: <20180607141017.29865-1-fbl@redhat.com> X-Mailer: git-send-email 2.14.3 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE 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] tap: flag as present after opening it. 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: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Assume the device is present if it can be opened. Reported-by: Eelco Chaudron Signed-off-by: Flavio Leitner Acked-by: Eelco Chaudron Tested-by: Eelco Chaudron --- lib/netdev-linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index d19bd86ac..d2b79e569 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -940,6 +940,7 @@ netdev_linux_construct_tap(struct netdev *netdev_) goto error_close; } + netdev->present = true; return 0; error_close: