From patchwork Fri Dec 4 04:55:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladislav Grishenko X-Patchwork-Id: 1539 Return-Path: Delivered-To: patchwork@openvpn.net Delivered-To: patchwork@openvpn.net Received: from director10.mail.ord1d.rsapps.net ([172.30.191.6]) by backend41.mail.ord1d.rsapps.net with LMTP id MIrIJ9Nfyl+jYwAAqwncew (envelope-from ) for ; Fri, 04 Dec 2020 11:12:03 -0500 Received: from proxy8.mail.ord1d.rsapps.net ([172.30.191.6]) by director10.mail.ord1d.rsapps.net with LMTP id EL5fJ9Nfyl8oSgAApN4f7A (envelope-from ) for ; Fri, 04 Dec 2020 11:12:03 -0500 Received: from smtp28.gate.ord1c ([172.30.191.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by proxy8.mail.ord1d.rsapps.net with LMTPS id 4IpUJ9Nfyl87ZAAAGdz6CA (envelope-from ) for ; Fri, 04 Dec 2020 11:12:03 -0500 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: smtp28.gate.ord1c.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; dkim=fail (signature verification failed) header.d=yandex-team.ru; dmarc=fail (p=none; dis=none) header.from=yandex-team.ru X-Suspicious-Flag: YES X-Classification-ID: 71c92b4e-364b-11eb-9005-a0369f1890f1-1-1 Received: from [216.105.38.7] ([216.105.38.7:39952] helo=lists.sourceforge.net) by smtp28.gate.ord1c.rsapps.net (envelope-from ) (ecelerity 4.2.38.62370 r(:)) with ESMTPS (cipher=DHE-RSA-AES256-GCM-SHA384) id 6B/25-09040-2DF5ACF5; Fri, 04 Dec 2020 11:12:03 -0500 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.90_1) (envelope-from ) id 1klDg4-0003hO-UB; Fri, 04 Dec 2020 16:11:24 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1klDfu-0003gx-Kd for openvpn-devel@lists.sourceforge.net; Fri, 04 Dec 2020 16:11:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: 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=ogDGrFfTqQROloTlVnvg29vIW/fOBzDaooc6Ox+II+M=; b=lMCQLTvspV4D3EbBYd4u//X2Cj JZDT5c2CUGNAGAghdO0ZPwFteZx7hCc4DfSiP1TrRdaCGnCSm67XJeddVCNFsAoDK1RaVW1RS9kcS ARw+3h9jdySwLo9vVXddtd426MKSbC1ifTPsbIHZlHD6IYzs6RczLBTelgLEz58mgeBo=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To :MIME-Version:Content-Type:Content-Transfer-Encoding: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=ogDGrFfTqQROloTlVnvg29vIW/fOBzDaooc6Ox+II+M=; b=hFEC482Y2nKjeRajH/bM7rqe5F US2A57ZuwnxDh1i/u9YY31do+l9w0bNJNWmxD84ljjrJBHM/2MNkAj9qGv83GNKYD+EAkXWePYxH+ qaWIrF2pKFkP8f0iohzqfNuBPArp08Z42kJjOrJUwefZdLK7rtHXKdDKVMVMkodllJZI=; Received: from forwardcorp1j.mail.yandex.net ([5.45.199.163]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1klDfb-001vKv-QG for openvpn-devel@lists.sourceforge.net; Fri, 04 Dec 2020 16:11:14 +0000 Received: from myt5-23f0be3aa648.qloud-c.yandex.net (myt5-23f0be3aa648.qloud-c.yandex.net [IPv6:2a02:6b8:c12:3e29:0:640:23f0:be3a]) by forwardcorp1j.mail.yandex.net (Yandex) with ESMTP id EE70C2E0EEA; Fri, 4 Dec 2020 18:55:20 +0300 (MSK) Received: from myt5-70c90f7d6d7d.qloud-c.yandex.net (myt5-70c90f7d6d7d.qloud-c.yandex.net [2a02:6b8:c12:3e2c:0:640:70c9:f7d]) by myt5-23f0be3aa648.qloud-c.yandex.net (mxbackcorp/Yandex) with ESMTP id dhQopOxBbh-tKweVXXf; Fri, 04 Dec 2020 18:55:20 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1607097320; bh=ogDGrFfTqQROloTlVnvg29vIW/fOBzDaooc6Ox+II+M=; h=In-Reply-To:Message-Id:References:Date:Subject:To:From:Cc; b=Do0TcVkAtvzvMCxHJ0w53FjgZvCfccvklBRbAPNPXW+L3i5cP77CAHFYLaxTTsyt3 G3ySpaVxN2t/V1cEtRT2sLCSZwIPWyhxNDMaRsscU9ZP6EHCEWCuTy1TA91kbqCMxe 4PdchUOrctdDFxjIhpoYcSNsJ0NDsNRivwxnQt9A= Received: from unknown (unknown [178.154.185.164]) by myt5-70c90f7d6d7d.qloud-c.yandex.net (smtpcorp/Yandex) with ESMTPSA id SyCcETma8o-tKmqj5uq; Fri, 04 Dec 2020 18:55:20 +0300 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client certificate not present) From: Vladislav Grishenko To: openvpn-devel@lists.sourceforge.net Date: Fri, 4 Dec 2020 20:55:16 +0500 Message-Id: <20201204155516.10267-1-themiron@yandex-team.ru> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201204140135.GX976@greenie.muc.de> References: <20201204140135.GX976@greenie.muc.de> X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -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_SIGNED Message has a DKIM or DK signature, not necessarily valid X-Headers-End: 1klDfb-001vKv-QG Subject: [Openvpn-devel] [PATCH] Drop EAI_NODATA, absent on FreeBSD and obsoleted by RFC3493 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: gert@greenie.muc.de MIME-Version: 1.0 Errors-To: openvpn-devel-bounces@lists.sourceforge.net X-getmail-retrieved-from-mailbox: Inbox --- src/openvpn/socket.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/openvpn/socket.c b/src/openvpn/socket.c index bd085e8f..31e8fe9a 100644 --- a/src/openvpn/socket.c +++ b/src/openvpn/socket.c @@ -625,10 +625,8 @@ query_servinfo(const char *domain, int proto, break; case DNS_ERROR_RCODE_NAME_ERROR: - return EAI_NONAME; /* HOST_NOT_FOUND */ - case DNS_INFO_NO_RECORDS: - return EAI_NODATA; /* NO_DATA */ + return EAI_NONAME; /* HOST_NOT_FOUND */ case DNS_ERROR_NO_DNS_SERVERS: case DNS_ERROR_RCODE_FORMAT_ERROR: @@ -642,7 +640,7 @@ query_servinfo(const char *domain, int proto, return EAI_AGAIN; /* TRY_AGAIN */ default: - return EAI_NODATA; + return EAI_FAIL; } struct servinfo *list = NULL, *first = NULL; @@ -682,7 +680,7 @@ query_servinfo(const char *domain, int proto, } else { - status = EAI_NODATA; + status = EAI_FAIL; } done: @@ -717,13 +715,11 @@ query_servinfo(const char *domain, int proto, switch (h_errno) { case HOST_NOT_FOUND: - return EAI_NONAME; - case NO_ADDRESS: #if NO_ADDRESS != NO_DATA case NO_DATA: #endif - return EAI_NODATA; + return EAI_NONAME; case NO_RECOVERY: return EAI_FAIL; @@ -782,7 +778,7 @@ query_servinfo(const char *domain, int proto, } else { - status = EAI_NODATA; + status = EAI_FAIL; } done: