From patchwork Thu Feb 24 05:55:56 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: 2322 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.30.191.6]) by backend41.mail.ord1d.rsapps.net with LMTP id GKFXIfO9F2LjdQAAqwncew (envelope-from ) for ; Thu, 24 Feb 2022 12:18:43 -0500 Received: from proxy19.mail.ord1d.rsapps.net ([172.30.191.6]) by director10.mail.ord1d.rsapps.net with LMTP id oPdWB/S9F2LRLQAApN4f7A (envelope-from ) for ; Thu, 24 Feb 2022 12:18:44 -0500 Received: from smtp13.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy19.mail.ord1d.rsapps.net with LMTPS id AIsnB/S9F2JIXAAAyH2SIw (envelope-from ) for ; Thu, 24 Feb 2022 12:18:44 -0500 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: smtp13.gate.ord1d.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: d0caf262-9595-11ec-aa57-525400b197d9-1-1 Received: from [216.105.38.7] ([216.105.38.7:54378] helo=lists.sourceforge.net) by smtp13.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id BA/FA-20852-3FDB7126; Thu, 24 Feb 2022 12:18:43 -0500 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.94.2) (envelope-from ) id 1nNHkP-0006co-T2; Thu, 24 Feb 2022 17:17:44 +0000 Received: from [172.30.20.202] (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.94.2) (envelope-from ) id 1nNHkH-0006cd-Mx for openvpn-devel@lists.sourceforge.net; Thu, 24 Feb 2022 17:17:36 +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=ERb54ilDtz/I+c9ipDvrSNuzfORyKS095tTCkjFhV2Q=; b=hXqMCcrXOjAMx6UH5X6x1BWfHY VD/HRnGX7aUtRzIdPwvWIWLNHDAwgddsmA7OQUa/0wb8be1YQdD+K0awEW3tYtHgTkUQPiUFIJEwq o9GaPXp97pVm4VXpZ5fKDpPw0zhI3pPvlUou19k2bgi/t99dnYfH5Ou4ZA1TbhepeDB0=; 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=ERb54ilDtz/I+c9ipDvrSNuzfORyKS095tTCkjFhV2Q=; b=LMwdlKXEH8n2qA/V1E4AdIfzOL +kl5U6Z1w42axj6opUd64aWTSZHrvhm7GYyNg/t1bSLX+7rUmwApPEOepv0BVxDYro1iX9PUvQJRg FSpeosT3IVPIfbT94/a+QR+X8N8byIcCClkXq0vWYUlo9X4nQzaFVcocwNCzAxew6BRM=; Received: from mail-wm1-f48.google.com ([209.85.128.48]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.94.2) id 1nNHkD-00Dpz3-Q2 for openvpn-devel@lists.sourceforge.net; Thu, 24 Feb 2022 17:17:36 +0000 Received: by mail-wm1-f48.google.com with SMTP id r187-20020a1c2bc4000000b003810e6b192aso218301wmr.1 for ; Thu, 24 Feb 2022 09:17:33 -0800 (PST) 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=ERb54ilDtz/I+c9ipDvrSNuzfORyKS095tTCkjFhV2Q=; b=K7+N4vjHK/xdwLoLKLKdaofpZdgx20jgSJgh2bj+FU2UEozVWd/djo9ezFl4boR02/ 61v+5lKQ1VvFa+B9lrpKhx4xKpltUN3sSx5B492p7FqHH+nhjERAPL0hh1C9XUss+5DG G5ngTUgvDbTDRRGIpskLRlvvUZxqIdTkQWO1g= 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=ERb54ilDtz/I+c9ipDvrSNuzfORyKS095tTCkjFhV2Q=; b=diHgGN04j18o3ysW3f+9mg6/gJ1u3hx01vLGOgbgY8ge2xxXMfSuJdV8D0mYCZjJZc eE06+yOt2xKs+O/nk3YjKOoxFCMk194zxP+XBcNYlzQuf3uPoGzWKCMoUKmQzoLqFt+P KEoAxXiTMkc9lvaa44p44yj0hn3JEzHhs9U8VMyNb2yKFFe1UiLj2F7ooBsUrGK9W4fx CYuRSWoOO4rByCw8sQdgmHLBhamHl4EToQxAqlGbt8G3Cf/pPf47tXfvhBElLnpOo1lW A0lM0XAoOzzXu0w74GAHHHrt59S1JD+Ma3E7qcNIhmpuqQaiIac8NLFb14qq4EEXL9Hf us6g== X-Gm-Message-State: AOAM531L0dL6+cFNqyxeiL0IjvBu0ANeJYMJrFD6TfHr1sktQllMwNqI RoJw//CrYgkeCY6yiADHPerK8AjO3SozrfwM X-Google-Smtp-Source: ABdhPJxJ1vz1nT7nRpikOd5BwgYPNVNWTocN/vHQ5DqTblU6HwAYm0Ct+TDxZ+x16uK9rrkClHzurA== X-Received: by 2002:a05:600c:26c6:b0:381:3b1:cea3 with SMTP id 6-20020a05600c26c600b0038103b1cea3mr3084851wmv.172.1645721761118; Thu, 24 Feb 2022 08:56:01 -0800 (PST) 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 d6sm3198308wrs.85.2022.02.24.08.56.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Feb 2022 08:56:00 -0800 (PST) To: openvpn-devel Date: Thu, 24 Feb 2022 17:55:56 +0100 Message-Id: <20220224165557.22060-2-kprovost@netgate.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220224165557.22060-1-kprovost@netgate.com> References: <20220224165557.22060-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 If control packets come in through the DCO interface (i.e. via dco_do_read()) we must process them through process_incoming_link(). This doesn't currently manifest, because Linux passes control packet [...] 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 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.48 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -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_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.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1nNHkD-00Dpz3-Q2 Subject: [Openvpn-devel] [PATCH 1/2] dco: process DCO control packets 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 If control packets come in through the DCO interface (i.e. via dco_do_read()) we must process them through process_incoming_link(). This doesn't currently manifest, because Linux passes control packets through the regular socket, not via the DCO netlink interface, but other platforms will not. Signed-off-by: Kristof Provost --- src/openvpn/forward.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/openvpn/forward.c b/src/openvpn/forward.c index cd956cb3..c16f32fc 100644 --- a/src/openvpn/forward.c +++ b/src/openvpn/forward.c @@ -1104,8 +1104,16 @@ process_incoming_link(struct context *c) static void process_incoming_dco(struct context *c) { + struct link_socket_info *lsi = get_link_socket_info(c); + msg(M_INFO, __func__); dco_do_read(&c->c1.tuntap->dco); + + c->c2.buf = c->c1.tuntap->dco.dco_packet_in; + c->c2.from = lsi->lsa->actual; + + process_incoming_link(c); + buf_init(&c->c1.tuntap->dco.dco_packet_in, 0); } /*