From patchwork Mon Sep 9 12:00:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 3810 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:6bd4:b0:5b9:581e:f939 with SMTP id c20csp1468177max; Mon, 9 Sep 2024 05:00:58 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWcbiGVmJQllJxYkFU61QO3CLuKJcTW/SDwRGnJPyPhnsDrknrJV12n8McK5V31CWG9BJ3/maBjW0w=@openvpn.net X-Google-Smtp-Source: AGHT+IHluwV9BY6i9fOeWfV1/OWYS3y2BUaf5cXh7PmwP5rW9fD+I+cXB5dXRVSR62xQzHeHAqbH X-Received: by 2002:a05:6870:8995:b0:278:5a4:10cc with SMTP id 586e51a60fabf-27b9d92a84bmr3748617fac.3.1725883257985; Mon, 09 Sep 2024 05:00:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725883257; cv=none; d=google.com; s=arc-20240605; b=kfQvOHm/z/Cz1XWwSIOMbfzxqQ3FzOcXTzg1NP22WwKLHiaOAhoYd2AhvNgxR+4jYu oYy/CpZVxBtP0kASwddfgMEIe69JIWQn3tTyQf1DpO4oqXEHG5zUJzJVUyZO3+RGOKmQ /KMoGJ5B/MkeBsTmp0ZOssS1fRjcResEkfzE32cfLS7zegQc9bxPEEvSUmfSy6zl/5QA awYEhLB8fXEsmEk6bLr3rcmJPFRy0eTw/lXbMPqcs7gzdcoDCEty++vc1xbezkxY6SN/ D0ok/jdy6fMzbRM5IrecbzCnYMCAvSpmoX7HTlo4zXxBy+B6o1+TM7ULYTZXV9fQCB9n 2blA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature; bh=clEkd7aJ8r56m8xvnT8C++kvXF8xMfjo1Mefmlc0xjc=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=SQ1/QT5R+ocdDzB3pllB+YgLYSW6GU2VHYS+iQFKmdPAktLc8qMnlZynqq1qrD0FZf TVmPk2f9Er9Ysw/FJWo13PHByrqizs+B6V2Tv9aRmYnxX1RSEbJzcDS2L9BONjObrekq GFv43LWkGK+S/Ffnq3zkCwACKgFzoZDM6Ym7gdGVf6y7emgN8OuteoFpfaaJyaDPvMVl EHp098L/vY7udIwctg0V03K0PXanMEjpB8rv9pAVoA5yK2wx7UaXyhj2/hqtsWsrzAHu NX7psQJUldhVPFgWqauRf7xwLVGA9RVH1UmjCh3O/QuoihfQgvEXliHTHOuKpXM4W2Sm 79Iw==; 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=QU7Bhtf6; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=DFDd0XI2; 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=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-27ba3ebb5c8si2304846fac.72.2024.09.09.05.00.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Sep 2024 05:00:56 -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=QU7Bhtf6; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=DFDd0XI2; 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=muc.de 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 1snd4Y-0002fk-Hh; Mon, 09 Sep 2024 12:00:46 +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 1snd4X-0002fe-Kw for openvpn-devel@lists.sourceforge.net; Mon, 09 Sep 2024 12:00:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FyDUX3Wf3hukFGjlh7kTK/ZotawrKZaXxkyI09y7d3E=; b=QU7Bhtf6awuxAUwZO+47xPS2Rg 0TVXuZDWkNmLmojbFyQ2iwxADfx7oVx6SA7ULjUe8xe8CHCi3wOFga2LEQqzC8LwNMeLAYTLzlV25 YmSnDTK/lDOGzjv3iI7nnhhfbbPMkuUANAootKOA2BzHFRb1E1YHoS6clInJGvxZgXfk=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID: Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=FyDUX3Wf3hukFGjlh7kTK/ZotawrKZaXxkyI09y7d3E=; b=DFDd0XI2VbEDKmqUm/w6tI5Vv4 mU2sq+pqvL+V6Oq5bYTewHLDg5VCbQKXnEq6124MlikQBrgB6cuJZpfMiNa+6ONTYaSx8CUoVkY2D dMS41NhREgVZ4ApdcdaBFWbvUb+av3OQ1bnLIUpNcDb5db2NPVUBzII5hJQhtZ0Lo81g=; Received: from dhcp-174.greenie.muc.de ([193.149.48.174] helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1snd4V-0004o3-PI for openvpn-devel@lists.sourceforge.net; Mon, 09 Sep 2024 12:00:45 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.17.1.9/8.17.1.9) with ESMTP id 489C0aYm028733 for ; Mon, 9 Sep 2024 14:00:36 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.17.1.9/8.17.1.9/Submit) id 489C0aDo028732 for openvpn-devel@lists.sourceforge.net; Mon, 9 Sep 2024 14:00:36 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 9 Sep 2024 14:00:36 +0200 Message-ID: <20240909120036.28723-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.44.2 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: -0.0 (/) 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: From: Marco Baffo 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 Acked-by: Frank Lichtenheld --- Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-Headers-End: 1snd4V-0004o3-PI Subject: [Openvpn-devel] [PATCH v1] 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1809719762214720498?= X-GMAIL-MSGID: =?utf-8?q?1809719762214720498?= From: Marco Baffo 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 Acked-by: Frank Lichtenheld --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/731 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Frank Lichtenheld 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);