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        <[EMAIL PROTECTED]>
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);
 }
 

Reply via email to