From patchwork Wed Sep 25 14:26:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "plaisthos (Code Review)" X-Patchwork-Id: 3875 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:6c93:b0:5b9:581e:f939 with SMTP id p19csp357986may; Wed, 25 Sep 2024 07:26:30 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUJCclCp1E5tYpJnoJYYvfRFJIVx8R+Fer9wPV7lVdG5y8l1YqYLVtYgJisNIhvuVy7hjJeeykaKI0=@openvpn.net X-Google-Smtp-Source: AGHT+IFUqjE4+vqS0igasSmiEiCv1R/shtzZqMa8HYWNEn5Dqe6VkHdjzRJVwbcpyljtV//vxf6I X-Received: by 2002:a05:6830:4124:b0:703:5d5c:3439 with SMTP id 46e09a7af769-713c7e20d32mr2547728a34.23.1727274390577; Wed, 25 Sep 2024 07:26:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727274390; cv=none; d=google.com; s=arc-20240605; b=TadlSGU8EbFAJBXJowbWWpksnVXz9xObmmR66WMUi6gx1ayWU8x/vWffrY9J8I66u9 2LhdvKh9ZU6Y+rrUC9RnnNm103hxAqiT4w5BYzku11SBurtGFoWLnlsqsulJNBzFLw0G 6es7Zgj1aHPAUy+aWmMRVcd2YkiheU4bARAWipuvNkox8ceFxuj/+e/iYJKoiPW61SXR Xflik9yxDoDFoyMnddehbsw7Sef9cROQlVcLLmJv1Jumqmd+1Qs2n5MImdUQWlG5WCcg Id5eLix4ro6OwOmTdg9bA2OtMKqr5iEp3iUgafRqamziSzDJEcaGC2zkp8bLzGG6ANLv Z/mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=jNulXOq+3c6WoFPZ4PYMteRDWMe1BJ15GAe8kls+QLs=; fh=lm0MLPW7DntlrDqRECIiC9JlE1uPxhepE0URYHIf+eE=; b=Yii2Tq0y59+YZzw0djFrkkW1iAj8SZuiqirAaHW82O/PqQ1LQKpIt+m/ZRiRNjTTKf aWMpOEfAlcp7ouqMDy17g28sMEt1POtUHBfjeKPsVkfK4Qv1DdmiUgxg88dWi+tA1Q83 f3JyUuJy4UoBYg9sd9MGL0PJjmQDdh59sBaCSsWIfCkCwZG3cy4yufHbkKJsFvJMKko4 1iqZJ7MZRdenGzbTUolDnPUh82vdHhplrjmkJtwO2CrS4zdSXIyqWgJU2V1IzyjR2tAg RNFzDr4SpKvi22GaaUVjxR0iIXnFlbj7eXk+A/QTd/bZoUuxsBdcls8OTZSEpeiTHkef +QfQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=lmHhkjeI; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jltMrb2o; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b="PuuQH/7X"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net; dara=fail header.i=@openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 46e09a7af769-713beb437e4si1716424a34.197.2024.09.25.07.26.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Sep 2024 07:26:30 -0700 (PDT) Received-SPF: pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) client-ip=216.105.38.7; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=lmHhkjeI; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=jltMrb2o; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b="PuuQH/7X"; spf=pass (google.com: domain of openvpn-devel-bounces@lists.sourceforge.net designates 216.105.38.7 as permitted sender) smtp.mailfrom=openvpn-devel-bounces@lists.sourceforge.net; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=openvpn.net; dara=fail header.i=@openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1stSyI-0007Jm-NU; Wed, 25 Sep 2024 14:26:26 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1stSyH-0007Jg-Oy for openvpn-devel@lists.sourceforge.net; Wed, 25 Sep 2024 14:26:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=AFVCf+ggHRZwnrzjAOdeLyRaXNZcLTKaauh8P9d/aMA=; b=lmHhkjeIZWWYkXOK0r76ObajOg UVRhST7Jy46YQBEqbOTtZBQu9DLaCnC9qGAvl09nukgb+uKJylTZaem0QFt+LuPbsSnlElPJeVkZo 6pzJRRN+ocS9yu3bMInhZN+S4gZ5gaJ36foGn02z6PgxQr95BmKn91W8uQ3fgeRtA0AI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=AFVCf+ggHRZwnrzjAOdeLyRaXNZcLTKaauh8P9d/aMA=; b=j ltMrb2oGxP1T129bb6eNQWxoeF0MF8ZAAzQLemS4hKFdc40TnLx+1vTcvFC0FaMqL0K4ruK/WsrYb O9nUjYzr1TGggHmr8na6qg5OYrOXtfNSQGgRbXumDzd77YtpFtMRu+JCRaaCDXFezW6iAT00HYPqX THe7wISBWPhufqmg=; Received: from mail-wm1-f44.google.com ([209.85.128.44]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1stSyG-00069k-BZ for openvpn-devel@lists.sourceforge.net; Wed, 25 Sep 2024 14:26:25 +0000 Received: by mail-wm1-f44.google.com with SMTP id 5b1f17b1804b1-42cb58d810eso6605745e9.0 for ; Wed, 25 Sep 2024 07:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1727274372; x=1727879172; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=AFVCf+ggHRZwnrzjAOdeLyRaXNZcLTKaauh8P9d/aMA=; b=PuuQH/7XbezXIj2KxihJfEAQSQwu3CG349U53fawxmjFqVf2HXwtRNoPpe1im0qLRy Sfu3CCB3WmUvd1c7ubrBevEl+fNc+600wh5PQ18YMG1LuOm7rla4f3plnDVbdT73+rtn 8FTg0jy1dv25gdIdcoyvwL2KM0M4wdgW/yWuV9fAs2YCf+nv73L/Y8552i3l8rXAz80w uUTCQPi/TqykV9cTuf6SYWIDXh+fO0VibUCT7HxoRtuJP7wPh7A8VH9I4fM1+YZxtPi+ UBOnZOPuBOAcD7S5uguB5oIA6kim+A6KeNrTQnxed2I4i+9CM6MbvPyF7K2zu6alNvlE mWow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727274372; x=1727879172; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AFVCf+ggHRZwnrzjAOdeLyRaXNZcLTKaauh8P9d/aMA=; b=kpiXWXY4SN8tNBqZDx4nacSvXoqpYsFZPsywMPjHoVXX65vWmROvX7TfI4emvCgs4U s8IjEMJmKt6Bu76Q8h0nFV4zcYRycxczrRg4Xr4dKK6MnkU00baadE/eqNvOo4xE1gQP G7Yu3GQRvLCOuBX7MiJNAIMqWImBjxtOU/Nx4YUPGD073CFc8OGWectqNIBrH2icMmTI FDP7ExsRA+Cq/XxMd5Ne3QPh2EZu+MprytDkOCfxsLRS0c7IoJyhDu8IfHyWbSyz/5Jg 1jLOtPtVV0k1xXrdIBlmQTXM2qU/+93BykGGq5qaBTQOgWRfkZ386Ny94sPZe2cXHR+J Y5Ng== X-Gm-Message-State: AOJu0Yz5kp4x6pYp5JyYq0GPJ88+xePRdS5LrY7HVu4ug53hzg/QM534 6Ds4O7AxjrSEKJA5kWCzw0jcUvEjc7vx0pdq8ZpB/H4i0ny8G9L/BWeishgurIhlIQNPMwX2Pxz 6 X-Received: by 2002:a05:600c:3b92:b0:426:64c1:8388 with SMTP id 5b1f17b1804b1-42e9604b7d3mr17807885e9.17.1727274372459; Wed, 25 Sep 2024 07:26:12 -0700 (PDT) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e969ddb4csm20474645e9.6.2024.09.25.07.26.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Sep 2024 07:26:12 -0700 (PDT) From: "plaisthos (Code Review)" X-Google-Original-From: "plaisthos (Code Review)" X-Gerrit-PatchSet: 1 Date: Wed, 25 Sep 2024 14:26:11 +0000 To: flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I9966636163c7dfa208d26f1cadbf5b81937f3a34 X-Gerrit-Change-Number: 772 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: ad12105a3318661b293fcb6b5383a95b15ad0806 References: Message-ID: MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -1.0 (-) X-Spam-Report: Spam detection software, running on the system "util-spamd-2.v13.lw.sourceforge.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-1.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.8 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.44 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1stSyG-00069k-BZ Subject: [Openvpn-devel] [XS] Change in openvpn[master]: Remove null check after checking for checking for did_open_tun X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com Cc: openvpn-devel Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1811178471380037230?= X-GMAIL-MSGID: =?utf-8?q?1811178471380037230?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/772?usp=email to review the following change. Change subject: Remove null check after checking for checking for did_open_tun ...................................................................... Remove null check after checking for checking for did_open_tun If we indicate that the tun device has been opened the c1.tuntap struct is guaranteed to be defined. This extra null check is something that Coverity flags as we access a do a null check after already accessing fields of tuntap Change-Id: I9966636163c7dfa208d26f1cadbf5b81937f3a34 --- M src/openvpn/init.c 1 file changed, 1 insertion(+), 4 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/72/772/1 diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 876edad..ae911a9 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -2546,10 +2546,7 @@ { event_timeout_init(&c->c2.route_wakeup, c->options.route_delay, now); event_timeout_init(&c->c2.route_wakeup_expire, c->options.route_delay + c->options.route_delay_window, now); - if (c->c1.tuntap) - { - tun_standby_init(c->c1.tuntap); - } + tun_standby_init(c->c1.tuntap); } else {