From patchwork Wed Aug 25 20:17:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Quartulli X-Patchwork-Id: 1924 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director15.mail.ord1d.rsapps.net ([172.30.191.6]) by backend30.mail.ord1d.rsapps.net with LMTP id KE0uDFAyJ2EfbwAAIUCqbw (envelope-from ) for ; Thu, 26 Aug 2021 02:18:56 -0400 Received: from proxy13.mail.ord1d.rsapps.net ([172.30.191.6]) by director15.mail.ord1d.rsapps.net with LMTP id SI3dC1AyJ2FxCQAAIcMcQg (envelope-from ) for ; Thu, 26 Aug 2021 02:18:56 -0400 Received: from smtp18.gate.ord1d ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy13.mail.ord1d.rsapps.net with LMTPS id iPW8C1AyJ2FvPwAAgjf6aA (envelope-from ) for ; Thu, 26 Aug 2021 02:18:56 -0400 X-Spam-Threshold: 95 X-Spam-Score: 0 X-Spam-Flag: NO X-Virus-Scanned: OK X-Orig-To: openvpnslackdevel@openvpn.net X-Originating-Ip: [216.105.38.7] Authentication-Results: smtp18.gate.ord1d.rsapps.net; iprev=pass policy.iprev="216.105.38.7"; spf=pass smtp.mailfrom="openvpn-devel-bounces@lists.sourceforge.net" smtp.helo="lists.sourceforge.net"; dkim=fail (signature verification failed) header.d=sourceforge.net; dkim=fail (signature verification failed) header.d=sf.net; dmarc=none (p=nil; dis=none) header.from=unstable.cc X-Suspicious-Flag: YES X-Classification-ID: 7db9fe14-0635-11ec-9232-5254005167a7-1-1 Received: from [216.105.38.7] ([216.105.38.7:59782] helo=lists.sourceforge.net) by smtp18.gate.ord1d.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 98/A3-13314-F4237216; Thu, 26 Aug 2021 02:18:56 -0400 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.90_1) (envelope-from ) id 1mJ8i3-0005g1-Vl; Thu, 26 Aug 2021 06:17:55 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mJ8i1-0005fr-Ve for openvpn-devel@lists.sourceforge.net; Thu, 26 Aug 2021 06:17:53 +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=Oe9HkYov7AHHWmOFx4Q6vbfyCLJFAxQI2ybcUyBj8RA=; b=RyNBbZxR2LGXYqcB1sfesZnp7t ZpEcY2u0mFOCKx33hc59rM69BXGYcX3UxW+xmaoC+14wUqWma+BoJwm6Z4N4Vqu7njgjV1jXjfGb1 gFgRGciUufgN83FjvcytKub1ds4YUm9pF72+HYNE3pjllX3leI4HshG/DqjasLrkjuco=; 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=Oe9HkYov7AHHWmOFx4Q6vbfyCLJFAxQI2ybcUyBj8RA=; b=d bQhu43/Hrb2Jg6I83gVnsG/eX7GL8b01Of1uLoH8aFW9smnbogM6Fj9WzWh2ch9UpbhOKkc7PTpqW UeTuxj9cxBLDBfO1ye3i/A+l6xxAiFDbFZKoNA26tqQUrW7qXhYvEkQ7W4mIp6dtz8AHb0Nw7x6d+ LkwDXFGD2vxrSTLc=; Received: from s2.neomailbox.net ([5.148.176.60]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1mJ8i0-00084n-0k for openvpn-devel@lists.sourceforge.net; Thu, 26 Aug 2021 06:17:53 +0000 From: Antonio Quartulli To: openvpn-devel@lists.sourceforge.net Date: Thu, 26 Aug 2021 08:17:25 +0200 Message-Id: <20210826061725.22169-1-a@unstable.cc> MIME-Version: 1.0 X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: unstable.cc] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1mJ8i0-00084n-0k Subject: [Openvpn-devel] [PATCH] route.c: pass the right parameter to IN6_IS_ADDR_UNSPECIFIED 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: , Cc: Antonio Quartulli Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox IN6_IS_ADDR_UNSPECIFIED on most systems is defined as a macro that expects a struct in6_addr* argument. In one instance we are passing the right address but using a wrong type. Fix this invocation by properly passing the right pointer. This issue might become more critical on systems implementing IN6_IS_ADDR_UNSPECIFIED as a function rather than a macro. Signed-off-by: Antonio Quartulli Acked-By: Arne Schwabe --- src/openvpn/route.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 2905e432..fd1125ef 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -3360,7 +3360,7 @@ get_default_gateway_ipv6(struct route_ipv6_gateway_info *rgi6, if (net_route_v6_best_gw(ctx, dest, &rgi6->gateway.addr_ipv6, rgi6->iface) == 0) { - if (!IN6_IS_ADDR_UNSPECIFIED(rgi6->gateway.addr_ipv6.s6_addr)) + if (!IN6_IS_ADDR_UNSPECIFIED(&rgi6->gateway.addr_ipv6)) { rgi6->flags |= RGI_ADDR_DEFINED; }