From patchwork Thu Mar 9 09:26:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kristof Provost X-Patchwork-Id: 3114 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:2310:b0:9f:bfa4:120f with SMTP id r16csp226713dye; Thu, 9 Mar 2023 01:27:29 -0800 (PST) X-Google-Smtp-Source: AK7set9WN0xONTlLh0mhf1VPzJgSH50qUCK4MXc2L/HviUYjuQVRfOHd4Nm6BPigxj5KuBSNH9zg X-Received: by 2002:a05:6a21:32a4:b0:c7:8644:a9f3 with SMTP id yt36-20020a056a2132a400b000c78644a9f3mr19709512pzb.11.1678354049750; Thu, 09 Mar 2023 01:27:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678354049; cv=none; d=google.com; s=arc-20160816; b=nnw/ztyJnlhNJlbIZvdXyQboqN3Ww0XcUoRdheC+w4E0eR0YeuDKMcP6VwE/vmxArM JXK6tXe73rtG+ug1JjWbOISv3nuAzs6imT9XbHzBM1HRMAohk/LdQsghiwlgJn8WJ9Lc 3ab4WApX64r5e9tGDZpbaqpMSUNu8SHmJoCyQl/ksQXuOB2m3sYT+p+ufRc0XvH/9KmT N0CJp4XGU6eiGFFWHsSYdSD7ulKen1N5+XbRmLkoJRAAdnHrM3QQWnQuu8Bbq9PhJ2T5 NVBRRTtDVDS+v2rQIG9jMjQ6HMxfLanZWnyem22bwQ5IJ4RSiRObnvbHYfgNOsnQ3Kst UTCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:content-transfer-encoding:reply-to:from:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:message-id:date:to:dkim-signature :dkim-signature:dkim-signature; bh=dcaIWRe7bEGr2m0joSO1IW67+mOWvflotmYyXIimOR4=; b=fiCc6TYLPOaorpxWYiO55n2Tvs68S60wkOaR0HCofrLJBqWl01vqNJZnaoU0lXy+Cu Gr9b5UGw2nkEqA2OTcKXyil29CvhN6izLG0HckkrTR5UFIc1/YXIcp3lBVSE62EC5lTK vPVowB3qx0rJYSXHOILodDXqI3hGxCrdksm+QooFR+zKk06qjSJoWwru03aWiBLNevKu UZngBN7eU6wlzS4WCJWWVMIc0/sNqN6Azhm6tjZH9dqicJRV4r8gCWS3wqGAC6BEa2mH CBWYsv86QjmFiNUoCfbPRM6JEh6j9q/umcnjFR0BQhNWJqQoLmLvAz8+h3toyyUhYoxd 0Ugw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=D2IW2hvf; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ZJs6eNMC; dkim=neutral (body hash did not verify) header.i=@netgate.com header.s=google header.b=hu3XbqTP; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id m68-20020a625847000000b0056cb8f6f027si18238228pfb.357.2023.03.09.01.27.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Mar 2023 01:27:29 -0800 (PST) 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=D2IW2hvf; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=ZJs6eNMC; dkim=neutral (body hash did not verify) header.i=@netgate.com header.s=google header.b=hu3XbqTP; 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=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=sourceforge.net 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 1paCYI-0002fJ-7O; Thu, 09 Mar 2023 09:27:10 +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.95) (envelope-from ) id 1paCY0-0002ee-7Y for openvpn-devel@lists.sourceforge.net; Thu, 09 Mar 2023 09:26:52 +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=krdic3kE0A/HWC6qiMfdM4dkkTKKkFMoKlGvfneRtRI=; b=D2IW2hvfb6z2hiy2N3M5XX1MAo 7KDPGDwlKp5OcJSesdxBnSbohvHTojKa/lYwSrioUvxy6l22xZUliQJwy7Z/tOn8n5mh3QkOkBmtd BgBKKHuY4jCSorNqkCFWHYO3TfiEfH3FDFQC0Z4wgvgJTCmvMiDe8A5PcYZG91XH0DG4=; 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=krdic3kE0A/HWC6qiMfdM4dkkTKKkFMoKlGvfneRtRI=; b=Z Js6eNMC32+NNhJqXWi6UjQ/RKfz12TCNzrpLISE3k7GQCrCCY62EXMXGvfMyKv86MzzIf1Ujl6r4V EOy4qUQPm54AJIEpXwb7s6M/HJo6le7h0NUEGvLDcDWO9jxLjzpERSu2OCc4IU9Sv7AVVtfhe02be KkFXQaTV7mQ1Cx4A=; Received: from mail-wr1-f51.google.com ([209.85.221.51]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1paCXr-0024Ym-6l for openvpn-devel@lists.sourceforge.net; Thu, 09 Mar 2023 09:26:46 +0000 Received: by mail-wr1-f51.google.com with SMTP id bx12so1153381wrb.11 for ; Thu, 09 Mar 2023 01:26:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netgate.com; s=google; t=1678353996; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=krdic3kE0A/HWC6qiMfdM4dkkTKKkFMoKlGvfneRtRI=; b=hu3XbqTPxyH7OxH77gls596QKE+cEs5d4/QJEc6vYq4SvR7f8ecUtcby1gTbStN/7Z qIDivvVp8HMHFYzeWNtPlBo0TbJRHfZbAj2ZiOqJpe9brjzMoC0AR3yRXMc/tXHc/3+n 6q/TVAv3Gn0jO9/vktd5LFyHY9p6nE98chi60= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678353996; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=krdic3kE0A/HWC6qiMfdM4dkkTKKkFMoKlGvfneRtRI=; b=xvgOUWxbfvZ6UPPci7f/ypcKZcap2lkMUej9qarF7mbCkcB9ODpEpnby4JgCaGSdTQ ozux8ep0G2bbHvvnF1Qjc2VE76et+cc+LNFGdRx+exea6A4TVZdkiuLX71ytbbc/LDW0 KQ3V7SIFak46UtDYeIgCExeVXM1C2kgxILrg55mHU0w1rm1etncbwDiGjMIM4Vvuyk8s bqQINxBNSWc4YTONwy8Da5+46pZEiPD7hEbwe3zEGLdtj5xlenboSTAHGMThkT+Zbg9D ldUmhtI/+zGuP8g09S1iSjOwYcMTluIpP3klcIIPdZG1AgjqinWLt3Eg1Ph9a/pAYEtt uKDQ== X-Gm-Message-State: AO0yUKXEU+4dkviuLaIIkDZXEeRqhzf/zjr9sKY0ETra+zgsnNLLzvgJ KIiJovrIPFZZFhuTp6eA3JkvS1YHEoNziqYvWG/ELQ== X-Received: by 2002:adf:e90f:0:b0:2c7:1c31:2348 with SMTP id f15-20020adfe90f000000b002c71c312348mr15357252wrm.19.1678353996187; Thu, 09 Mar 2023 01:26:36 -0800 (PST) Received: from nut.jupiter.sigsegv.be (ptr-8rfalzsse26o3oo9imw.18120a2.ip6.access.telenet.be. [2a02:1811:2402:bf00:f602:70ff:feae:6e98]) by smtp.googlemail.com with ESMTPSA id n19-20020a05600c3b9300b003eb395a8280sm2214704wms.37.2023.03.09.01.26.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Mar 2023 01:26:35 -0800 (PST) To: openvpn-devel Date: Thu, 9 Mar 2023 10:26:35 +0100 Message-Id: <20230309092635.7450-1-kprovost@netgate.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Score: -0.2 (/) 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: Kristof Provost Implement dco_version_string() for FreeBSD. Unlike Linux and Windows the DCO driver is built into the operating system itself, so we log the OS version as a proxy for the DCO version. --- src/openvpn/ [...] Content analysis details: (-0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.221.51 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.221.51 listed in wl.mailspike.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1paCXr-0024Ym-6l Subject: [Openvpn-devel] [PATCH] dco: print FreeBSD version 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 Reply-To: Kristof Provost Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1759881776320779803?= X-GMAIL-MSGID: =?utf-8?q?1759881776320779803?= From: Kristof Provost Implement dco_version_string() for FreeBSD. Unlike Linux and Windows the DCO driver is built into the operating system itself, so we log the OS version as a proxy for the DCO version. --- src/openvpn/dco_freebsd.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/openvpn/dco_freebsd.c b/src/openvpn/dco_freebsd.c index 2b94b2a2..a5e96bb2 100644 --- a/src/openvpn/dco_freebsd.c +++ b/src/openvpn/dco_freebsd.c @@ -31,6 +31,8 @@ #include #include #include +#include + #include #include "dco_freebsd.h" @@ -627,7 +629,17 @@ out: const char * dco_version_string(struct gc_arena *gc) { - return "v0"; + struct utsname name; + struct buffer out = alloc_buf_gc(256, gc); + int ret; + + ret = uname(&name); + if (ret != 0) + return "N/A"; + + buf_printf(&out, "%s", name.version); + + return (char *)out.data; } void