From patchwork Sat Jul 1 20:24:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3269 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:3c07:b0:d9:b492:11d6 with SMTP id ki7csp3407811dyb; Sat, 1 Jul 2023 13:25:51 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7EXw/aD7vjoFHi7ud3sh6ku4suotC7T70Zc+egibIP7nZr6kRj2GFbfSAw3U+dwnKMw+J+ X-Received: by 2002:a05:6a20:3b99:b0:128:f513:55ed with SMTP id b25-20020a056a203b9900b00128f51355edmr4293620pzh.54.1688243151563; Sat, 01 Jul 2023 13:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688243151; cv=none; d=google.com; s=arc-20160816; b=kmyy98OyaW7I4kkX+RGV+9iqycczFGQhgMTYt90BIVclu0gZnjpGlFlT/SJKuF25pr bhu+AuhMZo8kJ2dIojEPozAUtXodimnphet8L+3oM85I/24t0VOuuiHYJWcifqAInPF8 +NqAOuZOO3GqiDmwhAn2vZZyq201rvCEPnlrDwlz4FdaSu52VIQLPO9KUk4A8gCwOGd1 q1CJ7e0yqJgd9aRmwwnJ6EyAjzw/eVl9VE1XIM9vXSevLR+uVNnBKHfLdgJxTqdqbSfw T7kSYXMsH2pWRiHF3B4qjFanxM8m5wGVVnYaMBY8Vwv90nNjFG/AI8g1cUJvvrNnfnIV FKWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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; bh=Zbi0/kmKx2VWes50G6mf50QSbwahxmoBLt7i4txdXlU=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=SnibUD0uCxj/DUfpI7n7OcTdIt36NwCDsUtGTwqVZTC/7u5gEsw42olMoNUik6aWY7 oBWu2edtOWZuEdqBLKyEzbMx+uqPNw7NASe02D1qTd+1SffBe9Cvs8q03QZxpzJpINMR jiK5Ps+SUtEGfi5TdfZWzBWKyDl8/EM9LPnEhRdSeTeU+yTkJ0skSzk82bS3OGI22Wfw lOQkmolIaPJzsAJFKAC1ieRIm38LQq0JXxUuGCTz0UBiQUDCE4pJ6qzyYlf0wFkGL8kr RVv2AJoyduseaEj+1fmdkRUfTzwTgvpMGkAqc5xuQHdno4J0zpWOykPOOI6ukjzzSTMW jn9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=QFv2rICH; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=NTjkmlb8; 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 Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id p24-20020a63e658000000b0053f812a109esi15388669pgj.796.2023.07.01.13.25.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 01 Jul 2023 13:25:51 -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=QFv2rICH; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=NTjkmlb8; 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 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.95) (envelope-from ) id 1qFh9R-0001ZU-AO; Sat, 01 Jul 2023 20:25:01 +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.95) (envelope-from ) id 1qFh9P-0001ZF-Sc for openvpn-devel@lists.sourceforge.net; Sat, 01 Jul 2023 20:25:00 +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=FzhgmTpY37MA6x4uUIhiGMexG4ycjFiFhXtfnE7kTtg=; b=QFv2rICHnBqJff9SAzaCdvIMuR gOy26PjStxPCH577/XSEBm2MYDOo12Fqe2bat7DsMDEuKQ55oO6P+1EBcdG3X8Qu2RdR7SEhyiA9O 7vOesWlfoawLhJuEuQge3VGx2+sEvBtixS0a7jx4ECnJ41Opy3bREZyiq/9foOEIGqg0=; 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=FzhgmTpY37MA6x4uUIhiGMexG4ycjFiFhXtfnE7kTtg=; b=NTjkmlb8i2l3fk0+3JvUpNyoGh l4FHOaomua+nEBEPXPnCMkOBvzx0t4XRdzDnAKGzcQVxUJSdadsPJLeT3AU68sUFD2oO00Fanyob8 lKYdCO96KV7+utBK3EU/MFd2lKvV34Q87aJ6A2GzFWhC/LiQn6TtTm4VsXm6dLKjFivc=; Received: from mail.blinkt.de ([192.26.174.232]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1qFh9P-003UIF-IB for openvpn-devel@lists.sourceforge.net; Sat, 01 Jul 2023 20:25:00 +0000 Received: from kamera.blinkt.de ([2001:638:502:390:20c:29ff:fec8:535c]) by mail.blinkt.de with smtp (Exim 4.95 (FreeBSD)) (envelope-from ) id 1qFh9J-000PvE-2b for openvpn-devel@lists.sourceforge.net; Sat, 01 Jul 2023 22:24:53 +0200 Received: (nullmailer pid 3517871 invoked by uid 10006); Sat, 01 Jul 2023 20:24:53 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Sat, 1 Jul 2023 22:24:53 +0200 Message-Id: <20230701202453.3517822-2-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230701202453.3517822-1-arne@rfc2549.org> References: <20230629215611.3292788-1-arne@rfc2549.org> <20230701202453.3517822-1-arne@rfc2549.org> 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: the funktion is_on_link is not used on FreeBSD and triggers a warning/error (-Werror) on FreeBSD. Patch v2: use actual platforms instead an ifndef FreeBSD Change-Id: I6757d6509ff3ff522d6de417372a21e73ccca3ba Signed-off-by: Arne Schwabe --- src/openvpn/route.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Content analysis details: (0.2 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Headers-End: 1qFh9P-003UIF-IB Subject: [Openvpn-devel] [PATCH v2 4/4] Avoid unused function warning/error on FreeBSD (and potientially others) 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: =?utf-8?q?1770251250751761045?= X-GMAIL-MSGID: =?utf-8?q?1770251250751761045?= the funktion is_on_link is not used on FreeBSD and triggers a warning/error (-Werror) on FreeBSD. Patch v2: use actual platforms instead an ifndef FreeBSD Change-Id: I6757d6509ff3ff522d6de417372a21e73ccca3ba Signed-off-by: Arne Schwabe Acked-by: Gert Doering --- src/openvpn/route.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index d18acd016..0d04a5a33 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -1541,13 +1541,15 @@ local_route(in_addr_t network, return LR_NOMATCH; } -/* Return true if the "on-link" form of the route should be used. This is when the gateway for a +/* Return true if the "on-link" form of the route should be used. This is when the gateway for * a route is specified as an interface rather than an address. */ +#if defined(TARGET_LINUX) || defined(_WIN32) || defined(TARGET_DARWIN) static inline bool is_on_link(const int is_local_route, const unsigned int flags, const struct route_gateway_info *rgi) { return rgi && (is_local_route == LR_MATCH || ((flags & ROUTE_REF_GW) && (rgi->flags & RGI_ON_LINK))); } +#endif bool add_route(struct route_ipv4 *r,