From patchwork Thu Jun 23 22:37:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 2523 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director11.mail.ord1d.rsapps.net ([172.30.191.6]) by backend41.mail.ord1d.rsapps.net with LMTP id wDB7DC14tWKjTwAAqwncew (envelope-from ) for ; Fri, 24 Jun 2022 04:39:09 -0400 Received: from proxy11.mail.ord1d.rsapps.net ([172.30.191.6]) by director11.mail.ord1d.rsapps.net with LMTP id 6IReDC14tWIfPgAAvGGmqA (envelope-from ) for ; Fri, 24 Jun 2022 04:39:09 -0400 Received: from smtp28.gate.ord1c ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy11.mail.ord1d.rsapps.net with LMTPS id 0BD1Cy14tWKONwAAgKDEHA (envelope-from ) for ; Fri, 24 Jun 2022 04:39:09 -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: smtp28.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; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 1cd44b2a-f399-11ec-a9dd-a0369f1890f1-1-1 Received: from [216.105.38.7] ([216.105.38.7:47380] helo=lists.sourceforge.net) by smtp28.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id BC/C3-31896-C2875B26; Fri, 24 Jun 2022 04:39:08 -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 ) id 1o4epJ-0008Ml-By; Fri, 24 Jun 2022 08:38:04 +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 ) id 1o4epH-0008Mf-O4 for openvpn-devel@lists.sourceforge.net; Fri, 24 Jun 2022 08:38:02 +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:Cc:To:From:Sender:Reply-To: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=4Bb85kBqHbUnKbO3fWdPLxkliMIm0bGtH6EnO6/YDg8=; b=eEsZB96H1DzXiBMYGmgk8i3sEK wtbzbR75EDaAqzwFJQWChFbMApOi2Ar47oqf9o7xek7ZWTRCbtPxKEByFbVrDXQohHo+A4+mYEp9n v887J5YIbhKB+e7MDeuNe2i+ZfrGn5ZF/ePX/9N7sDrFKI5Eda5RfoH8R0oS6/ScNRK8=; 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:Cc:To:From:Sender:Reply-To: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=4Bb85kBqHbUnKbO3fWdPLxkliMIm0bGtH6EnO6/YDg8=; b=djedOrBxY1l6iU6Hro2oDPtFsT zfJHSETZFbmCnilPNGidCTY4+OBIfe1PzIDydWeDh7ba+48s2Kme6ORo0ZViZu3M+BQ+turE+sRTn Ut4zcWAQdQkeQC/GURvAxjjKfiQ9BWGlOZW1ve7ztQNZFZIbRiLwEZZO352xXXLqDHGk=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1o4epF-00C2OZ-IY for openvpn-devel@lists.sourceforge.net; Fri, 24 Jun 2022 08:38:02 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Fri, 24 Jun 2022 10:37:48 +0200 Message-Id: <20220624083809.23487-5-a@unstable.cc> In-Reply-To: <20220624083809.23487-1-a@unstable.cc> References: <20220624083809.23487-1-a@unstable.cc> 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: Signed-off-by: Antonio Quartulli --- src/openvpn/networking_sitnl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/openvpn/networking_sitnl.c b/src/openvpn/networking_sitnl.c index bffcb067..0944ad0a 100644 --- a/src/openvpn/networking_sitnl.c +++ b/src/openvpn/networking_sitnl.c @@ -28,6 +28,7 @@ Content analysis details: (-0.0 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1o4epF-00C2OZ-IY Subject: [Openvpn-devel] [PATCH 04/25] dco: create DCO interface using SITNL 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: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox Signed-off-by: Antonio Quartulli Acked-By: Arne Schwabe --- src/openvpn/networking_sitnl.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/openvpn/networking_sitnl.c b/src/openvpn/networking_sitnl.c index bffcb067..0944ad0a 100644 --- a/src/openvpn/networking_sitnl.c +++ b/src/openvpn/networking_sitnl.c @@ -28,6 +28,7 @@ #include "syshead.h" +#include "dco.h" #include "errlevel.h" #include "buffer.h" #include "misc.h" @@ -1344,6 +1345,16 @@ net_iface_new(openvpn_net_ctx_t *ctx, const char *iface, const char *type, struct rtattr *linkinfo = SITNL_NEST(&req.n, sizeof(req), IFLA_LINKINFO); SITNL_ADDATTR(&req.n, sizeof(req), IFLA_INFO_KIND, type, strlen(type) + 1); +#if defined(ENABLE_DCO) + if (arg && (strcmp(type, "ovpn-dco") == 0)) + { + dco_context_t *dco = arg; + struct rtattr *data = SITNL_NEST(&req.n, sizeof(req), IFLA_INFO_DATA); + SITNL_ADDATTR(&req.n, sizeof(req), IFLA_OVPN_MODE, &dco->ifmode, + sizeof(uint8_t)); + SITNL_NEST_END(&req.n, data); + } +#endif SITNL_NEST_END(&req.n, linkinfo); req.i.ifi_family = AF_PACKET;