From owner-freebsd-stable@FreeBSD.ORG Sat Apr 8 00:02:29 2006 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E65B16A400 for ; Sat, 8 Apr 2006 00:02:29 +0000 (UTC) (envelope-from rosti.bsd@gmail.com) Received: from uproxy.gmail.com (uproxy.gmail.com [66.249.92.171]) by mx1.FreeBSD.org (Postfix) with ESMTP id ECB1C43D45 for ; Sat, 8 Apr 2006 00:02:28 +0000 (GMT) (envelope-from rosti.bsd@gmail.com) Received: by uproxy.gmail.com with SMTP id m3so315037ugc for ; Fri, 07 Apr 2006 17:02:28 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:x-mailer:mime-version:content-type:content-transfer-encoding; b=idxOY83GIJrfuTZ4plOoshmU2CujV1fqawkVlE3e4DSX9qLcpE7Hiw/vdhwIMkd0+SPv9yyKoEGDO9BwtRD/aYO4NiyOEgsiyF+CypZ0KU2pAZYh+vycFsTpmDRqMfh3uDOdWA3Pxcsw4Y8tB1of1QP3M+AKDQ1rWyrTEQcbXpM= Received: by 10.66.232.17 with SMTP id e17mr1053461ugh; Fri, 07 Apr 2006 03:38:13 -0700 (PDT) Received: from saturn.lan ( [212.143.154.227]) by mx.gmail.com with ESMTP id k1sm255791ugf.2006.04.07.03.38.10; Fri, 07 Apr 2006 03:38:12 -0700 (PDT) Date: Fri, 7 Apr 2006 13:37:50 +0300 From: Rostislav Krasny To: Ulrich Spoerlein Message-Id: <20060407133750.b7080754.rosti.bsd@gmail.com> X-Mailer: Sylpheed version 2.2.4 (GTK+ 2.8.16; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: stable@freebsd.org Subject: Re: resolver doesn't see resolv.conf changes X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 08 Apr 2006 00:02:29 -0000 > when switching my laptop from LAN to a dialup connection, applications > started _before_ the switch will still try to send DNS queries to my > local DNS server. This isn't ideal, and the only workaround I've found > so far is to restart the application. > > Is the resolver supposed to periodically check for updates to the > resolv.conf, or are the applications somehow caching the IP of the DNS > server? If you're the author of the application you can periodically unset a RES_INIT bit mask option in _res.options. Next time your application will try to call res_send() it will call res_init() at first. This is according to a resolver(3) manual page.