From owner-freebsd-current Thu Feb 27 1:25:37 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9709F37B401 for ; Thu, 27 Feb 2003 01:25:35 -0800 (PST) Received: from omgo.iij.ad.jp (omgo.iij.ad.jp [202.232.30.157]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DB1C43FCB for ; Thu, 27 Feb 2003 01:25:34 -0800 (PST) (envelope-from shigeru@iij.ad.jp) Received: from ns.iij.ad.jp ([192.168.2.111]) by omgo.iij.ad.jp (8.12.7/8.12.7) with ESMTP id h1R9PW3Q017891 for ; Thu, 27 Feb 2003 18:25:32 +0900 (JST) Received: from fs.iij.ad.jp (root@fs.iij.ad.jp [192.168.2.9]) by ns.iij.ad.jp (8.8.5/3.5Wpl7) with ESMTP id SAA15549 for ; Thu, 27 Feb 2003 18:25:32 +0900 (JST) Received: from localhost (shigeru@mercury.iij.ad.jp [192.168.4.89]) by fs.iij.ad.jp (8.8.5/3.5Wpl7) with ESMTP id SAA12525 for ; Thu, 27 Feb 2003 18:25:32 +0900 (JST) Date: Thu, 27 Feb 2003 18:25:31 +0900 (JST) Message-Id: <20030227.182531.108817955.shigeru@iij.ad.jp> To: current@FreeBSD.ORG Subject: small patch for controlling resolver information cache From: YAMAMOTO Shigeru X-Mailer: Mew version 3.0.52 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Thu_Feb_27_18:25:31_2003_278)--" Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG ----Next_Part(Thu_Feb_27_18:25:31_2003_278)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi all, I make a small patch for mobile users. This patch is controlling cache of resolver information. If seting 'RES_NOCACHE' to 'yes', any application reads /etc/resolv.conf at any DNS quering. I think, it is useful for using heavey network applications, such as mozilla, in mobile environment. Please try it if you want. Thanks, ------- YAMAMOTO Shigeru ----Next_Part(Thu_Feb_27_18:25:31_2003_278)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="res_init.c.diff" cvs diff: Diffing . Index: res_init.c =================================================================== RCS file: /share/cvsup/FreeBSD/current/usr/src/lib/libc/net/res_init.c,v retrieving revision 1.30 diff -u -r1.30 res_init.c --- res_init.c 25 Sep 2002 04:06:35 -0000 1.30 +++ res_init.c 25 Feb 2003 06:34:52 -0000 @@ -493,7 +493,12 @@ _res.options |= RES_NOALIASES; else if ((cp = getenv("RES_OPTIONS")) != NULL) res_setoptions(cp, "env"); - _res.options |= RES_INIT; + if (getenv("RES_NOCACHE") != NULL) { + _res.options &= ~(RES_INIT); + } + else { + _res.options |= RES_INIT; + } return (0); } ----Next_Part(Thu_Feb_27_18:25:31_2003_278)---- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message