From: Nickolai Zeldovich Date: Mon, 16 Jul 2001 01:20:38 +0000 (+0000) Subject: afsdb-support-use-afs-not-dce-records-only-20010715 X-Git-Tag: openafs-stable-1_1_0~6 X-Git-Url: https://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=c817e39aa3a024b14cb9b576e2fc12f32437057a;hp=9e3578a67878b2fb1e4750c0fe4dcc1879c0f031 afsdb-support-use-afs-not-dce-records-only-20010715 so we don't use DCE AFSDB records --- diff --git a/src/auth/cellconfig.c b/src/auth/cellconfig.c index 860740d..49b5643 100644 --- a/src/auth/cellconfig.c +++ b/src/auth/cellconfig.c @@ -600,14 +600,17 @@ afsconf_GetAfsdbInfo(acellName, aservice, acellInfo) if (type == T_AFSDB) { struct hostent *he; + short afsdb_type; + afsdb_type = (p[0] << 8) | p[1]; code = dn_expand(answer, answer+len, p+2, host, sizeof(host)); if (code < 0) return AFSCONF_NOTFOUND; - /* Do we want to get TTL data for the A record as well? */ - he = gethostbyname(host); - if (he && server_num < MAXHOSTSPERCELL) { + if ((afsdb_type == 1) && + (server_num < MAXHOSTSPERCELL) && + /* Do we want to get TTL data for the A record as well? */ + (he = gethostbyname(host))) { afs_int32 ipaddr; memcpy(&ipaddr, he->h_addr, he->h_length); acellInfo->hostAddr[server_num].sin_addr.s_addr = ipaddr;