Date: Thu, 27 Feb 2003 18:25:31 +0900 (JST) From: YAMAMOTO Shigeru <shigeru@iij.ad.jp> To: current@FreeBSD.ORG Subject: small patch for controlling resolver information cache Message-ID: <20030227.182531.108817955.shigeru@iij.ad.jp>
next in thread | raw e-mail | index | archive | help
----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 <shigeru@iij.ad.jp> ----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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030227.182531.108817955.shigeru>