From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31343 invoked by alias); 28 Apr 2007 09:08:46 -0000 Received: (qmail 31283 invoked by uid 48); 28 Apr 2007 09:08:33 -0000 Date: Sat, 28 Apr 2007 09:08:00 -0000 Message-ID: <20070428090833.31282.qmail@sourceware.org> From: "madcoder at debian dot org" To: glibc-bugs@sources.redhat.com In-Reply-To: <20070425201054.4428.madcoder@debian.org> References: <20070425201054.4428.madcoder@debian.org> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug nscd/4428] hosts caching does not respect TTL, and caches old IP's X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2007-04/txt/msg00132.txt.bz2 ------- Additional Comments From madcoder at debian dot org 2007-04-28 10:08 ------- Given the number of pre-2001 software still around (time at which gethostby* calls were marked obsoletes) that indeed use gethostby* (and the number of more recent software using it too, even being obsolete) you are just knowingly breaking them. Quite interesting indeed. Btw I tested this _BUG_ doing: $ getent hosts ttl3.madism.org which after 3 seconds does not make a new request as it should (running nscd in debug mode shows it quite unambiguously). Interestingly enough, getent (from the libc you know) does that: $ ltrace getent hosts ttl3.madism.org > /dev/null __libc_start_main(0x402e40, 3, 0x7fffeead3c08, 0x403c40, 0x403c30 mtrace() = setlocale(6, "") = "LC_CTYPE=fr_FR.utf8;LC_NUMERIC=f"... textdomain("libc") = "libc" argp_parse(0x5053e0, 3, 0x7fffeead3c08, 0, 0x7fffeead3af4) = 0 strcmp("hosts", "hosts") = 0 inet_pton(10, 0x7fffeead547b, 0x7fffeead3aa0, 0x5070c0, 0x5070d0) = 0 inet_pton(2, 0x7fffeead547b, 0x7fffeead3aa0, 0, 0x7fffeead3a40) = 0 gethostbyname2(0x7fffeead547b, 10, 0x7fffeead3aa0, 116, 0) = 0 gethostbyname2(0x7fffeead547b, 2, 1, 0, 0x2ae1c05b8790) = 0x2ae1bc33cfe0 inet_ntop(2, 0x5070f8, 0x7fffeead3a40, 46, 0) = 0x7fffeead3a40 printf("%-15s %s", "127.0.0.1", "ttl3.madism.org") = 31 +++ exited (status 0) +++ So now I'm not surprised anymore I guess. You are breaking your own software. IMHO, given how broken gethostby* are with the use of nscd, either hosts caching should be removed, or gethostby* generate a warning at link time so that people get to know that those are not supported at *all*. -- http://sourceware.org/bugzilla/show_bug.cgi?id=4428 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.