From patchwork Sun Feb 14 11:13:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 582488 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 19F671402D6 for ; Sun, 14 Feb 2016 22:13:42 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=Pn+hHYMH; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; q=dns; s=default; b=dz1RZp/ZJsuLVKuS9KwpAA2lCvqKF ZYPa37eKK2WmztJG0P7+Knn3VS0qUJaKjNYyuhrnsLjL5bX7VlSpelBlxBwyAJNn e5QXxgaxOrFePVaWwqgEtfVZa8lpP1MwGWirbgfNR8aoBlAFITdDGpIXbWR8DSD7 EjhJVo3C3+WfAA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; s=default; bh=4w0K7ItNQl5p1PjIlULFxvQJexE=; b=Pn+ hHYMHaYH6yn2lnXWRoY4jdkHnpSg1LmX+U25opKjH034wGbsqcTJZSk5jytkpyhK 5B7tTcyX89FHpD8pN5AAZMBussTyH9OC51qFV+pmlLkLeMGGAZcdbs/KAOOvsLOo 9zs8M1MfkW3N9saO+jm/48rurxosBQNPufXdG42Q= Received: (qmail 90489 invoked by alias); 14 Feb 2016 11:13:36 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 90405 invoked by uid 89); 14 Feb 2016 11:13:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=ppp, 1187, 0.0.0.0, completes X-HELO: mx1.redhat.com To: GNU C Library From: Florian Weimer Subject: [PATCH] res_ninit: Update comment X-Enigmail-Draft-Status: N1110 Message-ID: <56C06159.4090307@redhat.com> Date: Sun, 14 Feb 2016 12:13:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 Since commit e66e7419a6f58200eec6941b14e2dcff9875cc6c (Actually make it possible to user the default name server.), the default is INADDR_LOOPBACK, not INADDR_ANY. Florian 2016-02-14 Florian Weimer * resolv/res_init.c (res_ninit): Update comment. diff --git a/resolv/res_init.c b/resolv/res_init.c index e0b6a80..128004a 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -118,21 +118,7 @@ unsigned long long int __res_initstamp attribute_hidden; /* * Set up default settings. If the configuration file exist, the values * there will have precedence. Otherwise, the server address is set to - * INADDR_ANY and the default domain name comes from the gethostname(). - * - * An interrim version of this code (BIND 4.9, pre-4.4BSD) used 127.0.0.1 - * rather than INADDR_ANY ("0.0.0.0") as the default name server address - * since it was noted that INADDR_ANY actually meant ``the first interface - * you "ifconfig"'d at boot time'' and if this was a SLIP or PPP interface, - * it had to be "up" in order for you to reach your own name server. It - * was later decided that since the recommended practice is to always - * install local static routes through 127.0.0.1 for all your network - * interfaces, that we could solve this problem without a code change. - * - * The configuration file should always be used, since it is the only way - * to specify a default domain. If you are running a server on your local - * machine, you should say "nameserver 0.0.0.0" or "nameserver 127.0.0.1" - * in the configuration file. + * INADDR_LOOPBACK and the default domain name comes from gethostname. * * Return 0 if completes successfully, -1 on error */