From: Antonio Quartulli Date: Thu, 26 Aug 2021 06:17:25 +0000 (+0200) Subject: route.c: pass the right parameter to IN6_IS_ADDR_UNSPECIFIED X-Git-Tag: v2.5.4~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=477781335cbca1aec69a372cbc18bf086155eea1;p=thirdparty%2Fopenvpn.git route.c: pass the right parameter to IN6_IS_ADDR_UNSPECIFIED 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: Message-Id: <20210826061725.22169-1-a@unstable.cc> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg22767.html Signed-off-by: Gert Doering (cherry picked from commit aa0e44e235f7bee0e12707b6899d00bad85195fc) --- diff --git a/src/openvpn/route.c b/src/openvpn/route.c index 3ff9f53de..5cfbb284f 100644 --- a/src/openvpn/route.c +++ b/src/openvpn/route.c @@ -3380,7 +3380,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; }