From patchwork Sat Oct 18 15:16:06 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathias Kresin X-Patchwork-Id: 400688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 58498140092 for ; Sun, 19 Oct 2014 02:16:23 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id F146B91D0A; Sat, 18 Oct 2014 15:16:21 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KoCg4mmTpu6t; Sat, 18 Oct 2014 15:16:20 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 4189F91C10; Sat, 18 Oct 2014 15:16:20 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 027361C2826 for ; Sat, 18 Oct 2014 15:16:20 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id F2A9D33031 for ; Sat, 18 Oct 2014 15:16:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nZrlTr2pW8rL for ; Sat, 18 Oct 2014 15:16:14 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by silver.osuosl.org (Postfix) with ESMTPS id 91BC830C84 for ; Sat, 18 Oct 2014 15:16:14 +0000 (UTC) Received: by mail-wg0-f50.google.com with SMTP id a1so2626093wgh.21 for ; Sat, 18 Oct 2014 08:16:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=QurtqSHPiNZFs9Inrtrs53RGM6OS8s0F7hQtX8Gkd1A=; b=eYVPIqowo4qoTx9jXVe1If9uPphExA21H5pneHtsAoeQ3lDAlJWIT2yOj3g0RtfMYy X8aE2arB+VrzJ6xVYBKZ+lL40OdaADGrdFJTT+iRH9oo8u9PMvM4VzeW9vsSG/ssBhIa 9yAhHVKgrKzh+NeDkxr3JWQsbJxLCns4QYjmar4as56wpBkB/Qf/m4ktMJjxVkdbow9B JECbWIUILcJ/HGGamNJ0PWfpbvvw4Af38dlO11LcCxsNCG6DJiKkX41Q2m1mZbKAHxL1 jntT9OlIMfgRpdpRgIlib0CPf4/kp8uhuSxN28cbQYeJ7SEdiNclgdUNtUTlfuy2Ix3I j+zA== X-Gm-Message-State: ALoCoQlLTQVwdvmvAI9z183yQcYjSrMapWk9BAql8XwXr+zEPHD5x+fX5ZBxTPW3cIfpMkWwvXxg X-Received: by 10.194.158.4 with SMTP id wq4mr6131041wjb.58.1413645372616; Sat, 18 Oct 2014 08:16:12 -0700 (PDT) Received: from desktop.wvd.kresin.me (p5DDC5DC1.dip0.t-ipconnect.de. [93.220.93.193]) by mx.google.com with ESMTPSA id ge1sm3272921wib.4.2014.10.18.08.16.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 18 Oct 2014 08:16:12 -0700 (PDT) From: Mathias Kresin To: uclibc@uclibc.org Subject: [PATCH 2/2] resolv: do not add search domains to PTR queries Date: Sat, 18 Oct 2014 17:16:06 +0200 Message-Id: <1413645366-28119-2-git-send-email-openwrt@kresin.me> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413645366-28119-1-git-send-email-openwrt@kresin.me> References: <1413645366-28119-1-git-send-email-openwrt@kresin.me> X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" The "IN-ADDR.ARPA" domain is fixed and never needs a search domain. Signed-off-by: Mathias Kresin --- libc/inet/resolv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/inet/resolv.c b/libc/inet/resolv.c index 3d3a540..7638526 100644 --- a/libc/inet/resolv.c +++ b/libc/inet/resolv.c @@ -1478,7 +1478,7 @@ int __dns_lookup(const char *name, * We were incurring long delays because of this. */ if (h.rcode == NXDOMAIN || h.rcode == SERVFAIL) { /* if possible, try first/next search domain */ - if (!is_fqdn) { + if (!is_fqdn && q.qtype != T_PTR) { DPRINTF("variant:%d sdomains:%d\n", variant, sdomains); if (variant < sdomains - 1 || (variant == sdomains -1 && !looks_like_fqdn)) { /* first/next search domain */