From patchwork Mon May 16 08:56:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristof Provost via Openvpn-devel X-Patchwork-Id: 2463 X-Patchwork-Delegate: a@unstable.cc Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director14.mail.ord1d.rsapps.net ([172.30.191.6]) by backend41.mail.ord1d.rsapps.net with LMTP id mG/4LKCegmICDQAAqwncew (envelope-from ) for ; Mon, 16 May 2022 14:57:36 -0400 Received: from proxy1.mail.ord1d.rsapps.net ([172.30.191.6]) by director14.mail.ord1d.rsapps.net with LMTP id AM6CMaCegmK4RwAAeJ7fFg (envelope-from ) for ; Mon, 16 May 2022 14:57:36 -0400 Received: from smtp12.gate.ord1c ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy1.mail.ord1d.rsapps.net with LMTPS id 2EQWMaCegmJCegAAasrz9Q (envelope-from ) for ; Mon, 16 May 2022 14:57:36 -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: smtp12.gate.ord1c.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; dkim=fail (signature verification failed) header.d=netgate.com; dmarc=pass (p=none; dis=none) header.from=lists.sourceforge.net X-Suspicious-Flag: YES X-Classification-ID: 0c8dff12-d54a-11ec-b2a1-bc305bf03e5c-1-1 Received: from [216.105.38.7] ([216.105.38.7:57896] helo=lists.sourceforge.net) by smtp12.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id CB/0A-15205-0AE92826; Mon, 16 May 2022 14:57:36 -0400 Received: from [127.0.0.1] (helo=sfs-ml-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1nqftU-00057O-N0; Mon, 16 May 2022 18:56:37 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1nqftT-00057I-Bk for openvpn-devel@lists.sourceforge.net; Mon, 16 May 2022 18:56:35 +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=O6sPNSicXrj9HMpogJG4dqk7HIIjeahBc60zzOZcUi4=; b=Un/8rfbTYLWeOdxv+xEC61PaP1 JuS7hvhtv5ztKf+YUlG/ngpFzhfZlSIcMM+yzs8JMf+ir2zl+ODvIFfxZrlOJM57Xa6UbzPImFaD0 s73r2EE36do9ML7BZrkBtqLqaFoDkMm1QD959su1BzgQmOdEY9DOMCLFg+0yedVSbYnU=; 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=O6sPNSicXrj9HMpogJG4dqk7HIIjeahBc60zzOZcUi4=; b=Nas6jbEUE1YPk7SusUiw1ohb/m Pi0Wm5868jWZgXRnUzcoTWOKWLHQvGJHMDm180NWwL+7QVVuCpdfzZAI8tbkpDVyCcA26pmG5xqDH od0hZ6YK9EZX0Jw9EFqTuLj7gzIYNprdL9Fd6GuLzS4HLBDAdLlASaV8LknvaijyQjg4=; Received: from mail-wm1-f48.google.com ([209.85.128.48]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.94.2) id 1nqftT-0006Uq-1i for openvpn-devel@lists.sourceforge.net; Mon, 16 May 2022 18:56:35 +0000 Received: by mail-wm1-f48.google.com with SMTP id k126-20020a1ca184000000b003943fd07180so108096wme.3 for ; Mon, 16 May 2022 11:56:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netgate.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=O6sPNSicXrj9HMpogJG4dqk7HIIjeahBc60zzOZcUi4=; b=dYBUdVX6mBYSXfml0ab1XsiBObidpsv9AQapMevlIFEtvnD34Otq8Kky1sUNWVXSJc trEAZFILQpKjVvTSLo+Ge83OkEvtGkM6bfZ6fSAGlFRtj2o+5lOBASIushx5d12iV32G hjehOpzH0wMpCxZHsMQtOAJZFVYNPTBNJvhq0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=O6sPNSicXrj9HMpogJG4dqk7HIIjeahBc60zzOZcUi4=; b=lmFaWLJ5TQRy34bHCsCaK7hpPHXTCOPtWqcmyeBcHdEF2N0w0IrrhzmnNTvzqeMbyC LPKeQJVoyuuR6Gmt6qar9UtzBJcF8SuA/03hOAFm1+l285DowSIsovUuli2rpITdwDkA 0qQG4eIWzsTTqHIVVPLyJu1K+eaPM61jjRjjJoIUQPuI2pwY+HBEp94n8TpKxfIwx59t EwsL3dD+vfIupHWwdxlxowHcTTg2FOPIiDYDYb7otQp9LGiUmQrSYn7qe26UFzBEvZlD RPdVQwueUPpxdd3a6o6YseOIP4nvI7YQnANCt2CEKCdoPsX5FzH4JDj089dyymnIRTEC qNCQ== X-Gm-Message-State: AOAM532XeZ4luQzoNZ2pGID5OeN4kCc4K4ScWdeMJdxs6L4V9m8KNnuW j4voAokl6ebgHXqEeUDkDMWW/EJNWH2s5A== X-Google-Smtp-Source: ABdhPJzvV/WroFsxGjtDToFwcH9hH8ksnqfaYM6xUiDHT2X5BR9tIfc4qT9yf/L5CmsBIfLCXwIfEA== X-Received: by 2002:a1c:2c6:0:b0:38f:f280:caa2 with SMTP id 189-20020a1c02c6000000b0038ff280caa2mr18083761wmc.87.1652727388240; Mon, 16 May 2022 11:56:28 -0700 (PDT) Received: from nut.jupiter.sigsegv.be (ptr-8rgvk5277arubwggeqg.18120a2.ip6.access.telenet.be. [2a02:1811:240d:2900:f602:70ff:feae:6e98]) by smtp.googlemail.com with ESMTPSA id 14-20020a05600c24ce00b003942a244ee1sm40075wmu.38.2022.05.16.11.56.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 May 2022 11:56:27 -0700 (PDT) To: openvpn-devel Date: Mon, 16 May 2022 20:56:21 +0200 Message-Id: <20220516185621.6182-5-kprovost@netgate.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220516185621.6182-1-kprovost@netgate.com> References: <20220516185621.6182-1-kprovost@netgate.com> MIME-Version: 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: From: Kristof Provost Signed-off-by: Kristof Provost --- src/openvpn/init.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 0d991ba4..701749cd 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -2232,6 +2232,21 @@ do_deferred_p2p_ncp(struct context *c) msg [...] Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.48 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.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.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.48 listed in wl.mailspike.net] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1nqftT-0006Uq-1i Subject: [Openvpn-devel] [PATCH 4/4] Set (DCO) timeouts as well for p2p mode 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: , X-Patchwork-Original-From: Kristof Provost via Openvpn-devel From: Kristof Provost via Openvpn-devel Reply-To: Kristof Provost Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox From: Kristof Provost Signed-off-by: Kristof Provost --- src/openvpn/init.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/openvpn/init.c b/src/openvpn/init.c index 0d991ba4..701749cd 100644 --- a/src/openvpn/init.c +++ b/src/openvpn/init.c @@ -2232,6 +2232,21 @@ do_deferred_p2p_ncp(struct context *c) msg(D_TLS_ERRORS, "ERROR: failed to set crypto cipher"); return false; } + + if (dco_enabled(&c->options) && (c->options.ping_send_timeout || c->c2.frame.mss_fix)) + { + int ret = dco_set_peer(&c->c1.tuntap->dco, + c->c2.tls_multi->peer_id, + c->options.ping_send_timeout, + c->options.ping_rec_timeout, + c->c2.frame.mss_fix); + if (ret < 0) + { + msg(D_DCO, "Cannot set DCO peer: %s", strerror(-ret)); + return false; + } + } + return true; }