From patchwork Tue Aug 20 12:23:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "cron2 (Code Review)" X-Patchwork-Id: 3792 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:21c2:b0:5b1:8b5e:23cb with SMTP id t2csp375291mae; Tue, 20 Aug 2024 05:24:27 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXVVZsbtbgNABJMlohnB8jO7PZui4B8KZKFBGlocAE59Uz2iKayddqEKMmQtoWBFdJ0vI+j7HtDHjA=@openvpn.net X-Google-Smtp-Source: AGHT+IF51pF4RpznKgBtAn/+DYB0tRQcfis1kdfNTCyBUPL+zSg29X5HKdzFeBpL0W7Hh22qPnhR X-Received: by 2002:a05:6808:21a3:b0:3db:3ba6:ff59 with SMTP id 5614622812f47-3dd3ae39ad6mr9397616b6e.6.1724156666754; Tue, 20 Aug 2024 05:24:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1724156666; cv=none; d=google.com; s=arc-20160816; b=Au0uiad0zrqKI1FuKV/aYur7MDNaci8OuCz7yUpO0niivhtYzqaVlFZR38oK0drdr9 IMuRyNV0bpfghjadjokqhnujAbpg/O9gcg6F90RT7xko41qWLCCPd1xLBcWEXuGdKmHf nhzCxd8dO8hTPPlzsq7aaWdmNYanLxuZj1hdBr1F2eVKqZKtUilS88aL6w/p88I1DV0U zsnOk1C9/AM+z/jU/kZylHdmu+FEdZG6JUmzqJKZsS1I6XCpRz12gHFZ53U2NKeD0/3O 1ykmJpOLFcVHkOv/yx/ZF/JKB/Oi5RsMz0C9wNPVe925Gg570VXMA/njfK5vnDP4Drac eMmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=h7xQK8O/U7vYDQlBZ0bNjOnro8Lu2fN4g7gA8Cyo/AA=; fh=U7wEyxtwz2o5+UdevFSA47vNeG9knhWH0KV//QhD5a0=; b=HUVZlHP3oZZl6bdtZNHQckRjiEQiLHPqgJdQpWPAv23OXazPExiSWpwPUmWoF84g2U s4yTqb7AZ3WQUoNs7BAEWhKcVzPO5ptx9AXRirXpMPAbHgKLU2CJursYBFn42pw43O6D O/HZ/qT2gm6BTmSO4aF7BBlvFhrZy6PKomo5hlod8DK1PI8M3e9MfW31PEz8m9c6CAca vr2VRh5aV2RPOIuP8KTuLPlAbMwtY5YbOvdowwDw5PV5LsTv+WgdjEfowSW0yRSe5tQo wnayJbpfD/wJH5RVa8cnrIfwcYcw/MELe8iGyDg8/RRuedqxnMSOW/5ARJuFup43eDQR rmGw==; 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=VUv0ytI6; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=NBKZTr0X; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=Ok6qxXH5; 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 41be03b00d2f7-7c6b649adddsi11169899a12.901.2024.08.20.05.24.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Aug 2024 05:24:26 -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=VUv0ytI6; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=NBKZTr0X; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=Ok6qxXH5; 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-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1sgNtl-0006Eo-Dr; Tue, 20 Aug 2024 12:23:41 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1sgNtk-0006Ed-Ds for openvpn-devel@lists.sourceforge.net; Tue, 20 Aug 2024 12:23:40 +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=exCNVVhsOYo/s2/m+PTg8uUrRwUHPrX4iMnVTjOBLl8=; b=VUv0ytI6CIxcLT+IDmaJJPp9J9 GwUuKqsRTycpeawFxtM6D8gGf9CkMc/1AUJbzwE8TOaiNzBn7oEqjmLMgtYrcj8otTHWbeclxxFxv yO15sfnY0P2GNtFSg3FcxFf9p56shEUILxmvCirf28ZQuJZ8O4CQjeg8X9sjgpIraaq0=; 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=exCNVVhsOYo/s2/m+PTg8uUrRwUHPrX4iMnVTjOBLl8=; b=N BKZTr0XG+VoeJV1860v7HrtBJo031pj1EL9fj8814JnKt2373iJT6lPivTDOH+M/GTp/oKEVwPSok dyffR8lQUTk6tRcGebC5mmmke70gV9I4vB/K8TVXG9w87g2fl9NyFeUNEJIdsPBA0cxFMEeciijeh DqHnf23YGy73IKWw=; Received: from mail-wm1-f41.google.com ([209.85.128.41]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1sgNtj-0003ML-GE for openvpn-devel@lists.sourceforge.net; Tue, 20 Aug 2024 12:23:40 +0000 Received: by mail-wm1-f41.google.com with SMTP id 5b1f17b1804b1-429ec9f2155so37660765e9.2 for ; Tue, 20 Aug 2024 05:23:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1724156608; x=1724761408; 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=exCNVVhsOYo/s2/m+PTg8uUrRwUHPrX4iMnVTjOBLl8=; b=Ok6qxXH5q3otMgKKlk7/MiYKKX5ysKEDx6mkRN+aTeOZiD2GQKQZsUgHQUCtY2ODRU ECBY2Iu5zUNjhw0GZ2xWYP9PnhDx3eO2RWS4sMrWeaPY1thYjxSRz23w/1O5GgVlqoiy BPZvaQfPgUfgrPP/mLxvEd/LLLlFxoNXbz+QGHSOna8gTjOOaMn52EF/u/mnWgBwIZgv 2tmUEOX1JFtQTqSXY2xu79827ADAIS7aj9QBHtcpMAdlNXog3C7nwVE8Uy3EC2Fh/y3V 5kaRFzOhlMxAhy/0sY/mFOFQXm6zK19QvozhoH1UUJ9EO2Pu0g8EnHl3bJ2zHgjp08Bg duhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724156608; x=1724761408; 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=exCNVVhsOYo/s2/m+PTg8uUrRwUHPrX4iMnVTjOBLl8=; b=CSCXCgprBkjtg7783+DWYm7/ut4vZk+6ywo48uJf0rBzq9IBJHPM+rK1aSuqOJdZvl 94HYSq8fTkv3hzvuNP2dceChEqOo52oygKL6bMv0AXAX7DJvoExsWdFGRR64B3qe9USY X7YI1AmgkeBeShYw5kTiecSVXGlXHh2/W8ychn0lK4a7Mt6eOylaXgedQsZjouTnP1op Z4uvbkRBPGzjAJ1Oo+UQdtjNDhOpNmPtfp+HSRHm0HtRs2UBiejdgHjlo/qoZ4wpAmrV pIW4Bc3Cp5KNgSZLANOeZDldQ7/46QQRj1XHLihiObZ5TS44FFWTe0kqCYBOP167JCXi Xsuw== X-Gm-Message-State: AOJu0YwhX9Ner9LW7HnhZ/CR/pVbWWxIpiX7hv3Y7aobqWflg4i/pHSA MticAhwgHRh/+Y7AbTr3mjOH7YKf9NZ2HrUcSbdKpKqZAKg5092zOpRBmLtjhb3Ib0C6f4AIwcq K X-Received: by 2002:a05:600c:4689:b0:426:54c9:dfed with SMTP id 5b1f17b1804b1-429ed7cce3dmr93632925e9.28.1724156607565; Tue, 20 Aug 2024 05:23:27 -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 ffacd0b85a97d-37195c57d48sm10893804f8f.53.2024.08.20.05.23.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 05:23:27 -0700 (PDT) From: "mrbff (Code Review)" X-Google-Original-From: "mrbff (Code Review)" X-Gerrit-PatchSet: 1 Date: Tue, 20 Aug 2024 12:23:26 +0000 To: plaisthos , flichtenheld Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: I235891212b15277349810913c9c1763da5c48587 X-Gerrit-Change-Number: 731 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: X-Gerrit-Commit: 1ac9462f8dab84c4ecdd595e4ee178f959a4a06b References: Message-ID: <42cc26dd37953dad1a92c6901ead7c1e483e19d1-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "util-spamd-1.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, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: openvpn.net] 0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.128.41 listed in bl.score.senderscore.com] 0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. [209.85.128.41 listed in sa-trusted.bondedsender.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.41 listed in wl.mailspike.net] 0.0 RCVD_IN_DNSWL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to DNSWL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [209.85.128.41 listed in list.dnswl.org] -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 Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1sgNtj-0003ML-GE Subject: [Openvpn-devel] [S] Change in openvpn[master]: tun: removed unnecessary route installations 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: marco@mandelbit.com, 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?1807909300600361512?= X-GMAIL-MSGID: =?utf-8?q?1807909300600361512?= X-getmail-filter-classifier: gerrit message type newchange Attention is currently required from: flichtenheld, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/731?usp=email to review the following change. Change subject: tun: removed unnecessary route installations ...................................................................... tun: removed unnecessary route installations Removed superfluous calls to 'add_route_ipv6' for adding ipv6 routes after tun opening in OpenBSD, NetBSD and Darwin. Change-Id: I235891212b15277349810913c9c1763da5c48587 Signed-off-by: Marco Baffo --- M src/openvpn/route.c M src/openvpn/tun.c 2 files changed, 1 insertion(+), 10 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/31/731/1 diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 71b5b42..31a634a 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -2244,9 +2244,6 @@ { argv_printf_cat(&argv, "-link -iface %s", device); } - /* FIX ME: in NetBSD in TUN mode, the route is already added by ifconfig - * so add_route_ipv6 fail with 'Invalid argument' or 'File exists' - */ argv_msg(D_ROUTE, &argv); bool ret = openvpn_execve_check(&argv, es, 0, diff --git a/src/openvpn/tun.c b/src/openvpn/tun.c index d878161..7bdc6c4 100644 --- a/src/openvpn/tun.c +++ b/src/openvpn/tun.c @@ -1010,8 +1010,7 @@ #endif /* ifdef _WIN32 */ } -#if defined(_WIN32) \ - || defined(TARGET_DARWIN) || defined(TARGET_NETBSD) || defined(TARGET_OPENBSD) +#if defined(_WIN32) /* some of the platforms will auto-add a "network route" pointing * to the interface on "ifconfig tunX 2001:db8::1/64", others need @@ -1203,11 +1202,6 @@ "FreeBSD BSD 'ifconfig inet6 -ifdisabled' failed"); #endif -#if defined(TARGET_OPENBSD) || defined(TARGET_NETBSD) \ - || defined(TARGET_DARWIN) - /* and, hooray, we explicitly need to add a route... */ - add_route_connected_v6_net(tt, es, is_multipoint); -#endif #elif defined(TARGET_AIX) argv_printf(&argv, "%s %s inet6 %s/%d mtu %d up", IFCONFIG_PATH, ifname, ifconfig_ipv6_local, tt->netbits_ipv6, tun_mtu);