From patchwork Mon Aug 24 16:14:25 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gert Doering X-Patchwork-Id: 5268 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:4306:b0:87d:ab56:3700 with SMTP id q6csp4625167mae; Mon, 24 Aug 2026 09:14:44 -0700 (PDT) X-Forwarded-Encrypted: i=2; AHgh+RrEIfU8lqY4cjlpEWLzByats01Ww8O9N6qx6nD59LQ0EBr2fbh20oqlX+QMDR4dr3P9XPz+dcrsl7w=@openvpn.net X-Received: by 2002:a05:6870:a112:b0:451:ca58:626e with SMTP id 586e51a60fabf-46447edf3c3mr212256fac.8.1787588084626; Mon, 24 Aug 2026 09:14:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1787588084; cv=none; d=google.com; s=arc-20260327; b=qGNRYj++nDC8YkbcBNWGQrUnna31UT/aJflxiE3IlOU+xi5iWDLAsvkyD1KQj79Z9j N1CiLPm7lvITedvwSsXeyNxOvTz/jMRdEldm+mgBOedRuZk/Dnqyl24SGKRiusyix/GR kvLqT3Ab+dhaukoRzwxs3VwKI4wOy4L6K5JG09cteeruAJ8zyZ/bdajIJikdawk+yoZ3 hEXnLGo1H8KZdoe9aJ5qL+DMcjMdfPpyRXVUBiIpfftMmfII4rIy2k904kJijcyFjjeo rtj+k9IAZUXKvwRW1k5o6Znrvb8kCUoxBmGbUQVCOVtzEay5BQnhVK5ChHL+Bwxk+XVa Bt6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=errors-to:content-transfer-encoding:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:subject :mime-version:references:in-reply-to:message-id:date:to:from :dkim-signature:dkim-signature:dkim-signature; bh=Tg6+rXh9aZFbfGmuE1EEzXo3iFguaUJC98mAD71SGlE=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=ZmezInC9rZRS2Qt5bitoxydjAUTY1eBGazYE95tdfIf3PCQSx8BlEwnnYKW6avPOwA d0Trhy6oDBDdP0G0O5sVdvYBXXSI5NmIUYgGKfc0WCPzzwo2y6koBRVOv6XSQiZNNssH zd8rijiyrpkaL6vnZU+hVFEdV1cYvCmUf3Wr8v5KPTrmbNAldUOmbj7wmKPxKFRVOPD8 jVh6Wq2RAWeakpP4S+l4BvrNPgXt2CJEcDmvFxfYvGqnk2d5AnPendJZNb1aY7oy4gjX NjluQDxztFADSK15P8fKxX95xioBZKKb1SPG3jXk3HDA8f1YVhjJHF+m2yOmKSEtx8Ru 2VLQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lists.sourceforge.net header.s=beta header.b=XNuxnyGf; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=lqXbmfxp; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=dlhPmMUz; 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=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id 586e51a60fabf-4638317f673si9551881fac.42.2026.08.24.09.14.44 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Aug 2026 09:14:44 -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=pass header.i=@lists.sourceforge.net header.s=beta header.b=XNuxnyGf; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=lqXbmfxp; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=dlhPmMUz; 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=fail (p=NONE sp=NONE dis=NONE) header.from=muc.de DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.sourceforge.net; s=beta; h=Content-Transfer-Encoding:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Subject:MIME-Version:References:In-Reply-To:Message-ID:Date:To:From:Sender: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Tg6+rXh9aZFbfGmuE1EEzXo3iFguaUJC98mAD71SGlE=; b=XNuxnyGfqHnI8zr+K1rQExiiJd u4lIRnP221Wk8ei81VirZZcvUPKRZ6UM3p3+cIhbzsADnhpH3hxJmuFp3xsNLaL0SK3WEEupYrrG1 E4pJLyYRG2DPgZL3lnJ2oiPKaMI8+zJC1dbEYa0sc1R241qJp4ZmwQAEIh+l0hbaWVMY=; 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 1wyXJr-0005In-9z; Mon, 24 Aug 2026 16:14:40 +0000 Received: from [172.30.29.66] (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 1wyXJp-0005Ig-Rx for openvpn-devel@lists.sourceforge.net; Mon, 24 Aug 2026 16:14:39 +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=PcUpNFdxA05Fpvps0G9ZbfFKOXOI5tBQSDizlp5PVNw=; b=lqXbmfxp+MUYRfZxGg3fFCQqwB ZEqmeY5vCQ/DRrr36JXc5V3PP1voDZ2vLnPx6igPd6iwXMflZ1/Uc8gSywvH8PrZhcFz2Mm+hV6N/ HEI7T+/pwlOFpY8nrNTXatHcRoalf/jP79nj6PpPGiOqgZJ24HM0Ptdj+cOzTerOrUrY=; 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=PcUpNFdxA05Fpvps0G9ZbfFKOXOI5tBQSDizlp5PVNw=; b=dlhPmMUz0KM7FonSjODK9XX6Di hsgYt9UomQ3PeJC2BWoZSD2ZWXd8oaRZxPg7HgtY6VSvsWk60+bq2tzT6eW6QqH03iwrmfjEUGuft yjiPLuVND40d2jtp75Bvv45kYOj7A3oM8Pd9CnB2KU9xS9foKtC9gl0M7YAKvFep5AVg=; Received: from [193.149.48.129] (helo=blue.greenie.muc.de) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1wyXJm-0007L7-Co for openvpn-devel@lists.sourceforge.net; Mon, 24 Aug 2026 16:14:39 +0000 Received: from blue.greenie.muc.de (localhost [127.0.0.1]) by blue.greenie.muc.de (8.18.1/8.18.1) with ESMTP id 67OGEV10001656 for ; Mon, 24 Aug 2026 18:14:31 +0200 Received: (from gert@localhost) by blue.greenie.muc.de (8.18.2/8.18.1/Submit) id 67OGEVsK001655 for openvpn-devel@lists.sourceforge.net; Mon, 24 Aug 2026 18:14:31 +0200 From: Gert Doering To: openvpn-devel@lists.sourceforge.net Date: Mon, 24 Aug 2026 18:14:25 +0200 Message-ID: <20260824161431.1639-1-gert@greenie.muc.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: MIME-Version: 1.0 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "sfi-spamd-2.hosts.colo.sdot.me", 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: Frank Lichtenheld This function has never been used in the git history. Probably an OpenVPN 1.x remnant. Identified by cppcheck. Content analysis details: (1.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RDNS_NONE Delivered to internal network by a host with no rDNS X-Headers-End: 1wyXJm-0007L7-Co Subject: [Openvpn-devel] [PATCH v1] route: Remove unused function print_routes 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: , Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: 1874421963449693627 X-GMAIL-MSGID: 1874421963449693627 From: Frank Lichtenheld This function has never been used in the git history. Probably an OpenVPN 1.x remnant. Identified by cppcheck. Change-Id: Idfa78643da27fe8a8bd0ff2bcf3025d8687024a9 Signed-off-by: Frank Lichtenheld Acked-by: Gert Doering Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1865 --- This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master. Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/1865 This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above): Gert Doering diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 8ea745d..6dbe3ec 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -185,19 +185,6 @@ dest->gc = a; } -static const char * -route_string(const struct route_ipv4 *r, struct gc_arena *gc) -{ - struct buffer out = alloc_buf_gc(256, gc); - buf_printf(&out, "ROUTE network %s netmask %s gateway %s", print_in_addr_t(r->network, 0, gc), - print_in_addr_t(r->netmask, 0, gc), print_in_addr_t(r->gateway, 0, gc)); - if (r->flags & RT_METRIC_DEFINED) - { - buf_printf(&out, " metric %d", r->metric); - } - return BSTR(&out); -} - static bool is_route_parm_defined(const char *parm) { @@ -1325,27 +1312,6 @@ #endif /* ifndef ENABLE_SMALL */ static void -print_route(const struct route_ipv4 *r, msglvl_t msglevel) -{ - struct gc_arena gc = gc_new(); - if (r->flags & RT_DEFINED) - { - msg(msglevel, "%s", route_string(r, &gc)); - } - gc_free(&gc); -} - -void -print_routes(const struct route_list *rl, msglvl_t msglevel) -{ - struct route_ipv4 *r; - for (r = rl->routes; r; r = r->next) - { - print_route(r, msglevel); - } -} - -static void setenv_route(struct env_set *es, const struct route_ipv4 *r, int i) { struct gc_arena gc = gc_new(); diff --git a/src/openvpn/route.h b/src/openvpn/route.h index 473df87..0d33d36 100644 --- a/src/openvpn/route.h +++ b/src/openvpn/route.h @@ -377,8 +377,6 @@ #endif -void print_routes(const struct route_list *rl, msglvl_t msglevel); - #ifdef _WIN32 void show_routes(msglvl_t msglevel);