From patchwork Thu Jun 29 21:56:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arne Schwabe X-Patchwork-Id: 3260 Return-Path: Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7301:3c07:b0:d9:b492:11d6 with SMTP id ki7csp2112853dyb; Thu, 29 Jun 2023 14:56:51 -0700 (PDT) X-Google-Smtp-Source: APBJJlEs6s87DPlFC7x9YbFJAMNhepNACaF9SitxmHqWWS4nu3efYiiEweOdeMy4ho+Fa/Zk/nuz X-Received: by 2002:a17:90a:fa95:b0:263:76e8:b66f with SMTP id cu21-20020a17090afa9500b0026376e8b66fmr462742pjb.30.1688075811266; Thu, 29 Jun 2023 14:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688075811; cv=none; d=google.com; s=arc-20160816; b=yxAbsx/YZUAQUIzk3nreUZ1NY0+0qElTb/kIyNchcs0JybEjdymaQXd/VG8plfNt6y SErl/PGJY/o4QyzXxpCh3l5systE6w1mz33N7lHwORn9M5XlhrD2oqrAa74YRgxGXo6O mY5lIvXfXuWAY2dVeKEyjshDqHWkX2+dPvij8wPpHveP9i6+WLuYHRcmHlVFxX9n9vZX XpeTM5v1jbxxHEbucrobcsvSX5AlsFa99XLe4H7KAJlY2eVNThU6YLP31cdHTB+Qvv93 RvctRlXxy7mHfaOurubj3R0GfkDQBU8DOrXmF05m8jQx0FkHHFmPzCk9l3E8QKxXyn5r o3yw== 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=iifQQVAq+tjId0UiofGV5aQaqpDLys8jdz8rGHUfG6s=; fh=4NbAC/LsuMLI0S0hprUlLSLCiHwg6SCAifhH718Jh0Q=; b=Mw3ZO92triaBlZESaRGBtot/VdM+wWlV6dDSm7VyvdznhC+r7mZ3FefB4A+y7wwuYU hRBJQfZV7yD2tkk6rnOWOZfmgbVkkSV3f55OcsJUy9mHLluj98u9Wmg8kU+O5imCn4qB R2d5rsgRa9QftkfranYfQjAzY3FWLY3oTb8/rvCwYXstg5Y4ykQq02fCe+hwBxA2qUZe tJOTbdeGKRJI2qf633AI0aH8Ws7YUbkQjm+Ote499EA/hePO6zCzUcbuS7vkmXz+8AJ+ 1pBr38Ks3z/IphKiTExeV7BMATKpkI8b+LXcDAl36816Ze+at0vprI1BKZFzw0Wse3t6 Wc9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b="R/OjolVC"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=CXUkAYM5; 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 ay2-20020a17090b030200b00262f7d7d2dfsi7586799pjb.40.2023.06.29.14.56.51 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jun 2023 14:56: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="R/OjolVC"; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=CXUkAYM5; 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 1qEzcl-0005w6-Tb; Thu, 29 Jun 2023 21:56:24 +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 1qEzcj-0005vz-PH for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:22 +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=Zg6VpxS0BasaU9ooVZdi1hXScQ7mXcoC0C8GKOGyB0U=; b=R/OjolVCryyqjMPVAxNQPma5Kf EMe2VAZ511n9qwK1+F4liptqjv5ng+NlTXTwx1rG34u1pW8kzTdli3p/cVW51LPNBzuyyOFwL/D3l uZiW9h+lMzk34aoXUHo4WMyseEom+gAyz8SFPDcL+1xyjlI/WKE7TTqIURu4ttmMQ9i0=; 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=Zg6VpxS0BasaU9ooVZdi1hXScQ7mXcoC0C8GKOGyB0U=; b=CXUkAYM5zpkB8mcbCi+gVYHXq2 kCrd+PJe001in90q061P9bP1CgU0FQUuwV3I51mopfEUM5JtHFQ6+0triMF0edsbHMqloU6HbzfV3 Kn1VNfJbBmSAs9oUBD13B3ln7Svplq1tlNl7utHsImmOvTQ7XDECguZFS78bWAFM7NIA=; 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 1qEzcg-001Ohn-Ti for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 21:56:22 +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 1qEzcZ-0004WZ-H3 for openvpn-devel@lists.sourceforge.net; Thu, 29 Jun 2023 23:56:11 +0200 Received: (nullmailer pid 3292847 invoked by uid 10006); Thu, 29 Jun 2023 21:56:11 -0000 From: Arne Schwabe To: openvpn-devel@lists.sourceforge.net Date: Thu, 29 Jun 2023 23:56:11 +0200 Message-Id: <20230629215611.3292788-6-arne@rfc2549.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230629215611.3292788-1-arne@rfc2549.org> References: <20230629215611.3292788-1-arne@rfc2549.org> MIME-Version: 1.0 X-Spam-Score: 0.3 (/) 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: the funktion is_on_link is not used on FreeBSD and triggers a warning/error (-Werror) on 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.3 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_NONE SPF: sender does not publish an SPF Record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record X-Headers-End: 1qEzcg-001Ohn-Ti Subject: [Openvpn-devel] [PATCH 4/4] Avoid unused function warning/error on FreeBSD 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?1770075781792342626?= X-GMAIL-MSGID: =?utf-8?q?1770075781792342626?= the funktion is_on_link is not used on FreeBSD and triggers a warning/error (-Werror) on FreeBSD. Change-Id: I6757d6509ff3ff522d6de417372a21e73ccca3ba Signed-off-by: Arne Schwabe --- 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..2180b7d1a 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. */ +#ifndef TARGET_FREEBSD 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,