From patchwork Mon Jun 26 13:09:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Korolev X-Patchwork-Id: 3256 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7300:7b9a:b0:c3:1364:a2a2 with SMTP id j26csp7675454dyk; Mon, 26 Jun 2023 06:10:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6rb/IV9xQHcHbiL1YNiEjmeXqLpMu58TMhWBD86ONPzfhZJ3x1T6/1vlkPoNswAzJx+B28 X-Received: by 2002:a05:6870:54c7:b0:19f:4f5c:82a7 with SMTP id g7-20020a05687054c700b0019f4f5c82a7mr28425171oan.22.1687785025515; Mon, 26 Jun 2023 06:10:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687785025; cv=none; d=google.com; s=arc-20160816; b=oq7mIvN0uPL8rCNjS6va2Y+PaIN24+fZalgE952ECHKN/zMGVUqYIY+RkZu8ZJ+Rck vKg2hrzIBnJkKj7FZtbms7Lo7uyxqmqRwz1dswraJqxy+r4uNUJTp1R/8dXPhN+aSJ0J lBv1KDObfPw4I5CC0BiM0XfUGRZ2FdZVhLWkb80XRvaCa7cYKOc+KxVvTEJKpcxn++Ad dkXtjfub9sKhP8rrmH6ddwS28SsUHTex1lxxiLEZeQ732Rcce99KDcBj8MIitsACxzN8 JWUYsV4Ga75B7/cyLzJTdSkV+oGMw4h5+PPhfOnSNfEfEGk+SqWyAOsIgFdp1rexLW+2 KuBA== 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=dhyrvacLH+wVDxcGmyYdxfkJqjlvEO6BuX4gTCdj+AE=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=XJGLZG0SMSzXCOIHOrnIz2ZeJjG7FX7mx20ZO52zpCpstpHniAfczpBF2s+0P/cLKR 9E6nnQdiC4gC1nv2YxLEi+asRCH1qx3Rs+iDj7gnRWV95tLpDUvnWyp/EbuwK+YLWGAW RQZSXdSqcGzU6c0laVIkdqMNnuJQtKSNZOhNLe6L6ROFxpKqOqp1IbD5Lm1HHN82Xjny p28bjpyRABvqAf6OfxG+LZUXnz9y95E7Nn8oJnm3WkElOC1KVfkvn1iUksj4H0pg1i4I kbVB+IwYQHT4eXlh6tMWuhZ5zJ0CgqHIjX7bJ2uKPcaUfIxn9DwlScKD8jdvhlYzbFo/ Uihg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=RyUBJgBp; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=DoDacW+c; dkim=neutral (body hash did not verify) header.i=@keenetic.com header.s=google header.b=EfCLFBKr; 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 16-20020a631150000000b005346b8dae84si5139951pgr.787.2023.06.26.06.10.24 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jun 2023 06:10:25 -0700 (PDT) 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=RyUBJgBp; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=DoDacW+c; dkim=neutral (body hash did not verify) header.i=@keenetic.com header.s=google header.b=EfCLFBKr; 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-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1qDlye-00009U-Vx; Mon, 26 Jun 2023 13:09:57 +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.95) (envelope-from ) id 1qDlyd-00009J-Si for openvpn-devel@lists.sourceforge.net; Mon, 26 Jun 2023 13:09:56 +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: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:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=MP5JfjV2a/szglBK8gUoQuqi5EY1FicL+a7oMDBFhsk=; b=RyUBJgBponIigCcyWV9S3dnwtz EJRioLAzJsZcLfP23JxRMc/oocpmQsGmcYAKLDwtxuc3E2/VIvUNRRdrEF1IdOuSp8DFAo355sP7v 1JPztPWkqfqQwmprhWmSZxEOuHLjo23CguGeqGhBTcYUFXWsPAiixDXRifBO68ePTMq4=; 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: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:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=MP5JfjV2a/szglBK8gUoQuqi5EY1FicL+a7oMDBFhsk=; b=D oDacW+cDbrYNv6LpGj/t6H/INdb9q5z1lvQ4Gwau6taZR9loEXMlsB2GP2tCQmYsznJbpiTr3j7e3 4OFPYq04mODTCmuApW7QXcFiNHMUljg5396G+SQr48Wnm8fyauKDxiVQa20GAUqWxjahLXB4meCRd aBE5LrwfYiBNVwOk=; Received: from mail-lj1-f178.google.com ([209.85.208.178]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1qDlyc-0003KO-He for openvpn-devel@lists.sourceforge.net; Mon, 26 Jun 2023 13:09:56 +0000 Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-2b6a152a933so14503621fa.1 for ; Mon, 26 Jun 2023 06:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=keenetic.com; s=google; t=1687784987; x=1690376987; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=MP5JfjV2a/szglBK8gUoQuqi5EY1FicL+a7oMDBFhsk=; b=EfCLFBKrS8hFcyHS1z47JCcr6o1LQVjGJ9pJrguzV5iIES0wK078VMRTHb8NUTbwDK KkqRePVl5w7+sMtkdBG5YbLlssQ9JZKPJx/yivzGpWD+LbEZ9i5hLEJiGx5x5DUQECBX ifzJAjg6dxlmJMgfnYkosDoFPIQWVA3hbaifM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687784987; x=1690376987; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=MP5JfjV2a/szglBK8gUoQuqi5EY1FicL+a7oMDBFhsk=; b=NMv2MnXvBz/Hi8Bfh3GhS8gbQd67Qex6/Y3OpArgYANXEuwgCiu22kiBki1D5Fl9nJ Np8MseyBPTu/uHGgkfnAPCNh0ndNvgC+EF13/JTv8YPD33gpoCp/Z4S7o0LYEO29twzw MncbDx8iBCObXr/K0IjhJHvW4SyvKQnaSeWvGjar+PsCpJIrrTbZA9ndYVPkIDkZKOYr mkbxdg+ExYSFSL1AalCEeo64ZqDYJqcFCxwidUc9zGQmyx0A9nl0cRbvsNlUn8n0X10G zkRDc592s/YXryCg1SnsBwVeWmbrBABSDd2WzFn0cCskAbvqnmJuBwmNeIkVTO9hhwND q12Q== X-Gm-Message-State: AC+VfDzhODUTnyCggv+T67epfDIugrOF8QTaTei026XDb5vPssO0Oqir 013aABjnm+38mY3L+DG+BGLVy4I0Hz31sUKySr3WbwV6uuXWzw== X-Received: by 2002:a2e:a16b:0:b0:2b4:6dbf:e700 with SMTP id u11-20020a2ea16b000000b002b46dbfe700mr16680567ljl.38.1687784987501; Mon, 26 Jun 2023 06:09:47 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f9:3b:4446::57]) by smtp.googlemail.com with ESMTPSA id m14-20020a2e97ce000000b002b469fd0baasm1222897ljj.111.2023.06.26.06.09.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Jun 2023 06:09:47 -0700 (PDT) To: openvpn-devel@lists.sourceforge.net Date: Mon, 26 Jun 2023 16:09:39 +0300 Message-Id: <20230626130939.3267280-1-sergey.korolev@keenetic.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Score: -0.2 (/) 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: Avoid compilation warnings on 32 bit platforms. dco_linux.c: In function 'dco_update_peer_stat': dco_linux.c:830:26: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'counter_type' {aka 'long long unsigned i [...] 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.208.178 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.208.178 listed in wl.mailspike.net] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1qDlyc-0003KO-He Subject: [Openvpn-devel] [PATCH] dco-linux: fix counter print format 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: Sergey Korolev via Openvpn-devel From: Sergey Korolev Reply-To: Sergey Korolev Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1769770870901531661?= X-GMAIL-MSGID: =?utf-8?q?1769770870901531661?= Avoid compilation warnings on 32 bit platforms. dco_linux.c: In function 'dco_update_peer_stat': dco_linux.c:830:26: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'counter_type' {aka 'long long unsigned int'} [-Werror=format=] 830 | msg(D_DCO_DEBUG, "%s / dco_read_bytes: %lu", __func__, | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 831 | c2->dco_read_bytes); | ~~~~~~~~~~~~~~~~~~ | | | counter_type {aka long long unsigned int} Signed-off-by: Sergey Korolev Acked-by: Antonio Quartulli --- src/openvpn/dco_linux.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openvpn/dco_linux.c b/src/openvpn/dco_linux.c index 2bfdf980..0cf36ba7 100644 --- a/src/openvpn/dco_linux.c +++ b/src/openvpn/dco_linux.c @@ -827,7 +827,7 @@ dco_update_peer_stat(struct context_2 *c2, struct nlattr *tb[], uint32_t id) if (tb[OVPN_GET_PEER_RESP_ATTR_LINK_RX_BYTES]) { c2->dco_read_bytes = nla_get_u64(tb[OVPN_GET_PEER_RESP_ATTR_LINK_RX_BYTES]); - msg(D_DCO_DEBUG, "%s / dco_read_bytes: %lu", __func__, + msg(D_DCO_DEBUG, "%s / dco_read_bytes: " counter_format, __func__, c2->dco_read_bytes); } else @@ -839,7 +839,7 @@ dco_update_peer_stat(struct context_2 *c2, struct nlattr *tb[], uint32_t id) if (tb[OVPN_GET_PEER_RESP_ATTR_LINK_TX_BYTES]) { c2->dco_write_bytes = nla_get_u64(tb[OVPN_GET_PEER_RESP_ATTR_LINK_TX_BYTES]); - msg(D_DCO_DEBUG, "%s / dco_write_bytes: %lu", __func__, + msg(D_DCO_DEBUG, "%s / dco_write_bytes: " counter_format, __func__, c2->dco_write_bytes); } else @@ -851,7 +851,7 @@ dco_update_peer_stat(struct context_2 *c2, struct nlattr *tb[], uint32_t id) if (tb[OVPN_GET_PEER_RESP_ATTR_VPN_RX_BYTES]) { c2->tun_read_bytes = nla_get_u64(tb[OVPN_GET_PEER_RESP_ATTR_VPN_RX_BYTES]); - msg(D_DCO_DEBUG, "%s / tun_read_bytes: %lu", __func__, + msg(D_DCO_DEBUG, "%s / tun_read_bytes: " counter_format, __func__, c2->tun_read_bytes); } else @@ -863,7 +863,7 @@ dco_update_peer_stat(struct context_2 *c2, struct nlattr *tb[], uint32_t id) if (tb[OVPN_GET_PEER_RESP_ATTR_VPN_TX_BYTES]) { c2->tun_write_bytes = nla_get_u64(tb[OVPN_GET_PEER_RESP_ATTR_VPN_TX_BYTES]); - msg(D_DCO_DEBUG, "%s / tun_write_bytes: %lu", __func__, + msg(D_DCO_DEBUG, "%s / tun_write_bytes: " counter_format, __func__, c2->tun_write_bytes); } else