Message ID | 4b34686b59b394fe61dc447f3083b91eb681f37d-HTML@gerrit.openvpn.net |
---|---|
State | New |
Headers | show
Return-Path: <openvpn-devel-bounces@lists.sourceforge.net> Delivered-To: patchwork@openvpn.net Received: by 2002:a05:7000:10cd:b0:5b9:581e:f939 with SMTP id j13csp2172006mae; Mon, 23 Sep 2024 06:41:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUBJFHd7yb6UwQon0LWoPsNxBH24v2wDHXB2l2Xt7dbwcsoK68FS+Z8WhHN/KWvoYFcOK16hLMzO8o=@openvpn.net X-Google-Smtp-Source: AGHT+IGFQrO2OcnzFz9EyjVqPpO6paVkIGd3DydE4uw8jj2Q847c29WjuuqrkQ+ORxfbEj8rIy3N X-Received: by 2002:a05:6e02:1c2f:b0:3a0:9fc6:5437 with SMTP id e9e14a558f8ab-3a0c8d0bf00mr89420035ab.18.1727098905242; Mon, 23 Sep 2024 06:41:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1727098905; cv=none; d=google.com; s=arc-20240605; b=lZp4zDFyhYknahpvw78RScLVrdxwgsGqgRnLkpu5hLa4g/oHndmltzWqbbs17dRPut Off9lTX58wfM+hNe4r9fk6MQ+rsJd/OXxZA1faLyTsLhNYA3jTNLINB+hBpfvHj5+r0Z IUtGU4cugTV6oBfFAWodZSUO51JlYuWEdzA71pGBOBoL2ML6Wuvz9/d7GpUCmdGqoKm1 rCFKXTuB9BpzGQxS2+XqZQmp7QwQjOAsoE8FTIjZs9JTAK/pQukkJ8xlBFFTth7FL3XD 5vLro0lmi596Zc3LB3f6VAPEoT9ddtBuLkC6zjxVWxHAjUyOKbOjA7D5+mXyrkwPwJYU CLgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:cc:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:user-agent :mime-version:message-id:references:auto-submitted:to:date:from :dkim-signature:dkim-signature:dkim-signature; bh=mriSdrdVs3w0Q6fYQvFzMyrV2n45GCZa+5DuMyOKKms=; fh=U7wEyxtwz2o5+UdevFSA47vNeG9knhWH0KV//QhD5a0=; b=lVouKmRYooNFgt4mlYxZ7MYhPqfeWJ15sae0F0xhCjyyrCtLb5vhQUpIrAgRp1xQPs xlfkwZm6uEdnEbW4i8LoEXeVDr1yi0TYGBHVcDJ2SJJaN6SKFaaSNkUP62/9h6cn0xGE 1cFj7YixAgWnz1qg4i8Gk8LOCE156C2qdiLkeCpr5sX6eWsWfc5njhtCsdpx1IlQJyOX AiBBhSlOuWO4Gwh8RPB6FG3WRsZJ6Tegjij+WnNRGsFkw9HPQu0auLWskHOgBufGQQXR N96UAO6SDvxwKDyJrDhELmjOxzzSLfgOYqRgZaHxir57A4TWdLEwPS2wdU/eJZoaRS4E oYlQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@sourceforge.net header.s=x header.b=gf0OSnGq; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=igMgIxyb; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=CfxAYfaF; 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=openvpn.net; dara=fail header.i=@openvpn.net Received: from lists.sourceforge.net (lists.sourceforge.net. [216.105.38.7]) by mx.google.com with ESMTPS id e9e14a558f8ab-3a092e9df3fsi94249625ab.202.2024.09.23.06.41.45 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Sep 2024 06:41:45 -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=gf0OSnGq; dkim=neutral (body hash did not verify) header.i=@sf.net header.s=x header.b=igMgIxyb; dkim=neutral (body hash did not verify) header.i=@openvpn.net header.s=google header.b=CfxAYfaF; 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=openvpn.net; dara=fail header.i=@openvpn.net Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from <openvpn-devel-bounces@lists.sourceforge.net>) id 1ssjJs-0004J9-R9; Mon, 23 Sep 2024 13:41:40 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from <gerrit@openvpn.net>) id 1ssjJp-0004Ig-8N for openvpn-devel@lists.sourceforge.net; Mon, 23 Sep 2024 13:41:37 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=Content-Type:Content-Transfer-Encoding:MIME-Version :Message-ID:Reply-To:References:Subject:List-Unsubscribe:List-Id:Cc:To:Date: From:Sender:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help: List-Subscribe:List-Post:List-Owner:List-Archive; bh=iGTyH1uVW6aOR22lC6gxNrZ7hmcQ8dDOjLaa7pNsics=; b=gf0OSnGqNaICZ6frbSTFfommfz cAEJ/aKeC5Co+ofV+q5ouwPS+C+Ulk9iz26NX6e/slY/BYhW3fum0OX6reUs2nak5vhKqtZYAy+JR UDtSnyQEWZ2ABnZah0EG/+chwjbessQFoBDrWz4w3vGTwmUq52CjInZNL7vEofaBCJrI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=Content-Type:Content-Transfer-Encoding:MIME-Version:Message-ID:Reply-To: References:Subject:List-Unsubscribe:List-Id:Cc:To:Date:From:Sender:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:In-Reply-To:List-Help:List-Subscribe:List-Post: List-Owner:List-Archive; bh=iGTyH1uVW6aOR22lC6gxNrZ7hmcQ8dDOjLaa7pNsics=; b=i gMgIxybKsop+xWyHYz3yEOZO/xD2O04ft94sIrmzW3IxS/AyD1SVsCFveZZ7rO+/BaOI77NJ9AA/I IO3G2MZ7ijkFbvQAW0LmUbWOXAp8aohjbR4L2NvUAuNmoSC5zz5yvb3/obJ9EWjOx0vj46ZPq1hiH p84pyzvCVNmRQEj4=; Received: from mail-wm1-f47.google.com ([209.85.128.47]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.95) id 1ssjJl-0006qO-Gm for openvpn-devel@lists.sourceforge.net; Mon, 23 Sep 2024 13:41:37 +0000 Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-42cb9a0c300so36762085e9.0 for <openvpn-devel@lists.sourceforge.net>; Mon, 23 Sep 2024 06:41:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvpn.net; s=google; t=1727098887; x=1727703687; darn=lists.sourceforge.net; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=iGTyH1uVW6aOR22lC6gxNrZ7hmcQ8dDOjLaa7pNsics=; b=CfxAYfaFLetkwGJrun360BBw6dpwlgTuT+nCTghVRZscjCkvvp57xEhN4r2pR8COOJ PL2z5HSJWDlxLMeyO6tKre0X5Y5yQMwtCYI2DSrTFkgPqQOHrkp0dmg48+aSyb5F/MME jITw4lAs/4liXUxW0Nynl9Yfoxpqr7kDz0/+PqsAbeZCjTUPln086bI5xMqe6AlFdhrg ccKypBO+9zGoP+6xzD/HtDnKriPslFbBNLBL9zyZ8snEd/fCICr8tUjS1qmWA9tI3Sdm T/09PrWGyX7yoYjVNq6kTZ5/MDgQSCu4Bds36WhdpeeY4z8fmu8qb4k2Nf6HNOlByZpp NLxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727098887; x=1727703687; h=user-agent:content-disposition:content-transfer-encoding :mime-version:message-id:reply-to:references:subject :list-unsubscribe:list-id:auto-submitted:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=iGTyH1uVW6aOR22lC6gxNrZ7hmcQ8dDOjLaa7pNsics=; b=B+2fPIHQsVc/S6YVvNydObULEj9ScebHPkVlQ4G0JtOCUaHski4fodNF0Vf3HBrqER Im3GItrs3eSRf0MQ1PUvBziMT99Y7x/xqj0OqSzJrzUIYQs+Vs8ksQ/SNfuc1UWmPkef EtYLENT9kKn7a6KhkYsBgsVh1cwKFm091gSIaz+PQQyTYigG7VzXGvyA2d/P+lM0OT7X UpjOjC+y3cLUkwbp/7b9SIF24Prvplmz2xrE23dWzuq342AVEv/+v9hKJ97y0Md0wEGI u8v4hSF2LapZlR9xI0sC0+UcJ0PmDT4Nt15jQ+yqAqyoOKcMvam+gxH0GTDkoJUAGIls 4NwA== X-Gm-Message-State: AOJu0YyH6NSTHmixkgcxF0XcvGhi3YYMDm5wQu/DuKeL7vtXDqDdUp0O hmXD7TQfu+kFfjKghl7scl6/sMp4YlXOm4BP/ay0Yvq6ySQXYcDgznQI++DJqKU= X-Received: by 2002:a05:600c:500c:b0:42c:bb96:340e with SMTP id 5b1f17b1804b1-42e7ada1cb1mr74107915e9.31.1727098886549; Mon, 23 Sep 2024 06:41:26 -0700 (PDT) Received: from gerrit.openvpn.in (ec2-18-159-0-78.eu-central-1.compute.amazonaws.com. [18.159.0.78]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42e7ae5fc68sm101756025e9.6.2024.09.23.06.41.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Sep 2024 06:41:26 -0700 (PDT) From: "its_Giaan (Code Review)" <gerrit@openvpn.net> X-Google-Original-From: "its_Giaan (Code Review)" <gerrit@gerrit.openvpn.in> X-Gerrit-PatchSet: 1 Date: Mon, 23 Sep 2024 13:41:25 +0000 To: plaisthos <arne-openvpn@rfc2549.org>, flichtenheld <frank@lichtenheld.com> Auto-Submitted: auto-generated X-Gerrit-MessageType: newchange X-Gerrit-Change-Id: Ie2471e6b2d6974e70423b09918ad1c2136253754 X-Gerrit-Change-Number: 762 X-Gerrit-Project: openvpn X-Gerrit-ChangeURL: <http://gerrit.openvpn.net/c/openvpn/+/762?usp=email> X-Gerrit-Commit: e93f8343e03109fca2581d7083291dcdb1f15814 References: <gerrit.1727098847000.Ie2471e6b2d6974e70423b09918ad1c2136253754@gerrit.openvpn.net> Message-ID: <4b34686b59b394fe61dc447f3083b91eb681f37d-HTML@gerrit.openvpn.net> MIME-Version: 1.0 User-Agent: Gerrit/3.8.2 X-Spam-Score: -1.1 (-) 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: Attention is currently required from: flichtenheld, ordex, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit Content analysis details: (-1.1 points, 6.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [209.85.128.47 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.9 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.128.47 listed in wl.mailspike.net] 0.0 WEIRD_PORT URI: Uses non-standard port number for HTTP 0.0 HTML_MESSAGE BODY: HTML included in message -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 0.0 T_KAM_HTML_FONT_INVALID Test for Invalidly Named or Formatted Colors in HTML X-Headers-End: 1ssjJl-0006qO-Gm Subject: [Openvpn-devel] [S] Change in openvpn[master]: override ai_family if 'local' numeric address was specified X-BeenThere: openvpn-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: <openvpn-devel.lists.sourceforge.net> List-Unsubscribe: <https://lists.sourceforge.net/lists/options/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=unsubscribe> List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum_name=openvpn-devel> List-Post: <mailto:openvpn-devel@lists.sourceforge.net> List-Help: <mailto:openvpn-devel-request@lists.sourceforge.net?subject=help> List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/openvpn-devel>, <mailto:openvpn-devel-request@lists.sourceforge.net?subject=subscribe> Reply-To: gianmarco@mandelbit.com, arne-openvpn@rfc2549.org, openvpn-devel@lists.sourceforge.net, frank@lichtenheld.com, a@unstable.cc Cc: openvpn-devel <openvpn-devel@lists.sourceforge.net> Content-Type: multipart/mixed; boundary="===============2083037383073780578==" Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox X-GMAIL-THRID: =?utf-8?q?1810994461920193087?= X-GMAIL-MSGID: =?utf-8?q?1810994461920193087?= X-getmail-filter-classifier: gerrit message type newchange |
Series |
[Openvpn-devel,S] Change in openvpn[master]: override ai_family if 'local' numeric address was specified
|
expand
|
diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index 27566c6..f152071 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -489,9 +489,8 @@ sig_info = &sigrec; } - /* try numeric ipv6 addr first */ + /* try numeric ip addr first */ CLEAR(hints); - hints.ai_family = ai_family; hints.ai_flags = AI_NUMERICHOST; if (flags & GETADDR_PASSIVE) @@ -519,6 +518,10 @@ const char *fmt; int level = 0; + /* this is not a numeric IP, therefore force resolution using the + * provided ai_family */ + hints.ai_family = ai_family; + if (hostname && (flags & GETADDR_RANDOMIZE)) { hostname = hostname_randomize(hostname, &gc); @@ -1712,6 +1715,10 @@ sock->local_host, sock->local_port, gai_strerror(status)); } + + /* the resolved 'local entry' might have a different family than what + * was globally configured */ + sock->info.af = sock->info.lsa->bind_local->ai_family; } gc_free(&gc);
Attention is currently required from: flichtenheld, ordex, plaisthos. Hello plaisthos, flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/762?usp=email to review the following change. Change subject: override ai_family if 'local' numeric address was specified ...................................................................... override ai_family if 'local' numeric address was specified This change ensures that when a numeric IP address is specified as argument to a 'local' directive, its ai_family overrides the one extracted from the 'proto' config option. Change-Id: Ie2471e6b2d6974e70423b09918ad1c2136253754 Signed-off-by: Antonio Quartulli <a@unstable.cc> --- M src/openvpn/socket.c 1 file changed, 9 insertions(+), 2 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/62/762/1