From: Roland McGrath Date: Mon, 18 Jul 2005 02:01:06 +0000 (+0000) Subject: 2005-06-08 Karl Kelley X-Git-Tag: cvs/fedora-glibc-2_3-20050718T0425~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec9f4abf6c1d5d38657761a7236a281a45397244;p=thirdparty%2Fglibc.git 2005-06-08 Karl Kelley [BZ #1088] * hesiod/hesiod_p.h (struct hesiod_p): Add classes array. * hesiod/hesiod.c (hesiod_init): Initialize classes. Fail if no valid classes were given or if both are equal. (hesiod_resolve): Use ctx->classes instead of hardcoded C_IN and C_HS order. (parse_config_file): Handle classes keyword. * hesiod/README.hesiod: Mention addition of the classes keyword. --- diff --git a/hesiod/README.hesiod b/hesiod/README.hesiod index 18cd5d45dd4..259ce8d4475 100644 --- a/hesiod/README.hesiod +++ b/hesiod/README.hesiod @@ -71,6 +71,14 @@ will want to create your own. It should look something like: rhs=.your.domain lhs=.ns + classes=in,hs + +The optional classes settings specifies which DNS classes Hesiod +should do lookups in. Possible values are IN (the preferred class) +and HS (the deprecated class, still used by some sites). +You may specify both classes separated by a comma to try one class +first and then the other if no entry is available in the first +class. The default value of the classes variable is `IN,HS'. The value of rhs can be overridden by the environment variable `HES_DOMAIN'. diff --git a/hesiod/hesiod_p.h b/hesiod/hesiod_p.h index 71aca0976d5..5010d71bc91 100644 --- a/hesiod/hesiod_p.h +++ b/hesiod/hesiod_p.h @@ -41,6 +41,7 @@ struct hesiod_p { void (*res_set)(struct hesiod_p *, struct __res_state *, void (*)(void *)); struct __res_state * (*res_get)(struct hesiod_p *); + int classes[2]; /* The class search order. */ }; #define MAX_HESRESP 1024