9fans archive / 1999 / 04 / 5 /    prev next

From: arisawa@ar.... arisawa@ar....
Subject: [9fans] nfs server
Date: Mon, 12 Apr 1999 05:03:45 -0400 (EDT)

Hello 9fans.

I added UNIX to my network and added the name to:
	/lib/ndb/nfs
	/lib/ndb/local
to enable access to my Plan9 file system.
However nfs server rejected to connect with the message:
	auth: unknown ip address: host=202.250.160.73
The message comes from:
	if(getdnsdom(cmd->host, dom, sizeof(dom))<0){
		clog("auth: unknown ip address: host=%s", cmd->host);
		return error(reply, 1);
	}
in nfsmount.c.

I experienced this message some months (or a year) ago when I did something.

getdnsdom is defined rpcserver.c; the function gets domname from IP using
		sprint(buf, "echo %d.%d.%d.%d ptr | ndb/dnsquery",
			ip>>24, (ip>>16)&0xff, (ip>>8)&0xff, ip&0xff);
On the other hands, manual says:
         Ndb/dnsquery can be used to query ndb/dns to see how it
          resolves requests.  Ndb/dnsquery prompts for commands of the
          form

               domain-name request-type

          where request-type can be ip, mx, ns, cname, ptr....  In the

It seems to me dnsquery is used to get IP from domname.
So I made some experiments whether dnsquery can really answer domname
from IP or not:
	echo 202.250.160.73 ptr | ndb/dnsquery
This is an example. I tried several IPs and found that some IPs are successfully
processed but some are not.

We have ndb/query that gets domname from IP, 
and rpcserver.c already has a similar function:
	getdom(ulong ip, uchar *name, int len)
It is strange that getdom is not used anywhere.
I replaced getdnsdom by getdom in nfsmount.c and after that my UNIX can be
authenticated by Plan9.

There may be a reason that getdom should not be used.

Comments are welcome.

Kenji Arisawa
E-mail: arisawa@aic...