| Message ID | 20220810094605.123072-1-frank@lichtenheld.com |
|---|---|
| State | Superseded |
| Headers |
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director9.mail.ord1d.rsapps.net ([172.27.255.53]) by backend30.mail.ord1d.rsapps.net with LMTP id WOiwGLl+82J0BgAAIUCqbw (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Wed, 10 Aug 2022 05:47:37 -0400 Received: from proxy5.mail.iad3a.rsapps.net ([172.27.255.53]) by director9.mail.ord1d.rsapps.net with LMTP id qFtrGLl+82KEegAAalYnBA (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Wed, 10 Aug 2022 05:47:37 -0400 Received: from smtp2.gate.iad3a ([172.27.255.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy5.mail.iad3a.rsapps.net with LMTPS id z2WKD7l+82K+WAAAhn5joQ (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) for <patchwork@openvpn.net>; Wed, 10 Aug 2022 05:47:37 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp2.gate.iad3a.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=lichtenheld.com X-Suspicious-Flag: YES X-Classification-ID: 76cad6cc-1891-11ed-bbeb-525400de56ae-1-1 Received: from [216.105.38.7] ([216.105.38.7:51684] helo=lists.sourceforge.net) by smtp2.gate.iad3a.rsapps.net (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 2E/67-10547-8BE73F26; Wed, 10 Aug 2022 05:47:36 -0400 Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1oLiIS-0004DE-Jq; Wed, 10 Aug 2022 09:46:39 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from <frank@lichtenheld.com>) id 1oLiIB-0004D1-Mp for openvpn-devel@lists.sourceforge.net; Wed, 10 Aug 2022 09:46:22 +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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Hxy8BK8QlAjoF/46jHSm1ud+y8Sz+eoHdzbUajDsC+o=; b=XDwavkAlmYJrdnD4hUr23esAur 8g/Lv6Zioot3uE6tD3mKfvnOP3kik+vj8w2t23mbmJw4u+hk7WbeIN9YgJjSIBBVa7OllH3LiXQqW NsPjukOektXPMhYmbBu0H7Opf7/9SeCwt4fILRnK+fIE8uM8zi5J6XQImuJU4SVewRV4=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Transfer-Encoding:MIME-Version: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:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=Hxy8BK8QlAjoF/46jHSm1ud+y8Sz+eoHdzbUajDsC+o=; b=l WQvMAssy7nOSCViAGgcfcbJX/OYS37u/pWH0WC4/kzC8jclC4eBX6EWETprM9ofniJt5JZ0yiOT5A 8jPyUdcwGjBBtlpXRzndbSTlTfeIeDSBBdjvoCPrFSCN7tHQMxavr8o3gzpMSXDaUZ7CuG6hXbkPH 9t+czo1GRYKOsPj8=; Received: from mout-p-201.mailbox.org ([80.241.56.171]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1oLiI5-0001Ht-WC for openvpn-devel@lists.sourceforge.net; Wed, 10 Aug 2022 09:46:22 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4M2lSG3qWJz9sQj for <openvpn-devel@lists.sourceforge.net>; Wed, 10 Aug 2022 11:46:06 +0200 (CEST) From: Frank Lichtenheld <frank@lichtenheld.com> To: openvpn-devel@lists.sourceforge.net Date: Wed, 10 Aug 2022 11:46:05 +0200 Message-Id: <20220810094605.123072-1-frank@lichtenheld.com> MIME-Version: 1.0 X-Rspamd-Queue-Id: 4M2lSG3qWJz9sQj 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: Currently we issue a message when using --ifconfig but not specifying a default gateway. This seems to be misleading, the setup will still work fine since in P2P we now send all traffic to the peer an [...] Content analysis details: (-0.7 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [80.241.56.171 listed in list.dnswl.org] X-Headers-End: 1oLiI5-0001Ht-WC Subject: [Openvpn-devel] [PATCH] dco_p2p_add_new_peer: do not warn about missing default gw X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openvpn-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel> List-Post: <mailto:openvpn-devel@lists.sourceforge.net> List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox |
| Series |
[Openvpn-devel] dco_p2p_add_new_peer: do not warn about missing default gw
|
|
Commit Message
Frank Lichtenheld
Aug. 9, 2022, 11:46 p.m. UTC
Currently we issue a message when using --ifconfig but
not specifying a default gateway. This seems to be misleading,
the setup will still work fine since in P2P we now send
all traffic to the peer anyway. Or it might be irrelevant
if all route specifications include a gateway anyway.
Since it is probably better to have no message than a
misleading one, remove it.
Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com>
---
src/openvpn/dco.c | 4 ----
1 file changed, 4 deletions(-)
Comments
Hi, On 10/08/2022 11:46, Frank Lichtenheld wrote: > Currently we issue a message when using --ifconfig but > not specifying a default gateway. This seems to be misleading, > the setup will still work fine since in P2P we now send > all traffic to the peer anyway. Or it might be irrelevant > if all route specifications include a gateway anyway. > > Since it is probably better to have no message than a > misleading one, remove it. > > Signed-off-by: Frank Lichtenheld <frank@lichtenheld.com> Acked-by: Antonio Quartulli <a@unstable.cc> Regards, > --- > src/openvpn/dco.c | 4 ---- > 1 file changed, 4 deletions(-) > > diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c > index 4f40255e..8aa7e896 100644 > --- a/src/openvpn/dco.c > +++ b/src/openvpn/dco.c > @@ -438,10 +438,6 @@ dco_p2p_add_new_peer(struct context *c) > } > remote_addr4 = &remote_ip4; > } > - else if (c->options.ifconfig_local) > - { > - msg(M_INFO, "DCO peer init: Need a peer VPN addresss to setup IPv4 (set --route-gateway)"); > - } > > struct sockaddr *remoteaddr = &ls->info.lsa->actual.dest.addr.sa; >
Hi, On Wed, Aug 10, 2022 at 11:46:05AM +0200, Frank Lichtenheld wrote: > diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c > index 4f40255e..8aa7e896 100644 > --- a/src/openvpn/dco.c > +++ b/src/openvpn/dco.c > @@ -438,10 +438,6 @@ dco_p2p_add_new_peer(struct context *c) > } > remote_addr4 = &remote_ip4; > } > - else if (c->options.ifconfig_local) > - { > - msg(M_INFO, "DCO peer init: Need a peer VPN addresss to setup IPv4 (set --route-gateway)"); > - } Looking more closely, this is a really nice gem you found here :-) The kernel should not care at all for remote_addr4 or remote_addr6 in p2p mode ("it is never used for anything") *but* it does - so, if you twist openvpn into setting up an ipv4-only tunnel, with topology subnet, and no --route-gateway in the config (which would trigger the message above), DCO actually refuses to bring up the interface: 2022-08-10 21:09:31 dco_new_peer: netlink reports error (-7): Invalid input data or parameter 2022-08-10 21:09:31 dco_new_peer: failed to send netlink message: Invalid argument (-22) 2022-08-10 21:09:31 Cannot add peer to DCO: Invalid argument (-22) ... we did not see this in the t_client tests, as this needs *v4-only*, and I never tested this ("3a" does now), and the kernel was happy with "either v4 or v6, as long as I can ignore one of them"... So, I think that for p2p, the whole remote_addr4/remote_addr6 thing can be removed - more than just the message :-) - but first the kernel needs to understand this as well. FreeBSD DCO is happy with v4 and no route-gateway... gert PS: # Test 3a: UDP / p2mp tun, topology subnet, IPv4-only inside, over IPv6 # (no route-gateway, explicit gateway on routes) # # triggers (Linux) DCO mishap "needs v4 or v6 remote VPN address even on p2p" # RUN_TITLE_3a="udp / p2pm / top subnet / IPv4-only, no 'route-gateway'" OPENVPN_CONF_3a="$OPENVPN_BASE_P2MP --dev tun --proto udp --remote $REMOTE --port 51195 --pull-filter ignore ifconfig-ipv6 --pull-filter ignore route-ipv6 --pull-filter ignore route-gateway --route 10.194.0.0 255.255.0.0 10.194.3.1" EXPECT_IFCONFIG4_3a=$EXPECT_IFCONFIG4_3 EXPECT_IFCONFIG6_3a=- PING4_HOSTS_3a="10.194.3.1 10.194.0.1" PING6_HOSTS_3a=
Hi, On Wed, Aug 10, 2022 at 11:46:05AM +0200, Frank Lichtenheld wrote: > Currently we issue a message when using --ifconfig but > not specifying a default gateway. This seems to be misleading, > the setup will still work fine since in P2P we now send > all traffic to the peer anyway. Or it might be irrelevant > if all route specifications include a gateway anyway. > > Since it is probably better to have no message than a > misleading one, remove it. For the record, this is has been obsoleted by https://patchwork.openvpn.net/project/openvpn2/patch/20220815223941.26839-1-a@unstable.cc/ which rips out the whole section of code, more than "just the warning". much better :-) Setting this one to "superseded" in patchwork. gert
diff --git a/src/openvpn/dco.c b/src/openvpn/dco.c index 4f40255e..8aa7e896 100644 --- a/src/openvpn/dco.c +++ b/src/openvpn/dco.c @@ -438,10 +438,6 @@ dco_p2p_add_new_peer(struct context *c) } remote_addr4 = &remote_ip4; } - else if (c->options.ifconfig_local) - { - msg(M_INFO, "DCO peer init: Need a peer VPN addresss to setup IPv4 (set --route-gateway)"); - } struct sockaddr *remoteaddr = &ls->info.lsa->actual.dest.addr.sa;