[H-GEN] LPD Stops working if internet link is down....
Michael Anthon
mca at tams.com.au
Wed Jan 19 21:41:36 EST 2000
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Please observe the list's charter. ]
Ok, have done a bit more testing this morning cause this has got me really
confused.
I performed a simple test. I ran 'lpq -Pgorgrael' on the machine 'belial'
(10.10.10.2) and tcpdump'd the resulting activity on port 53 from gorgrael
(10.10.10.11).
Here is what I see from a single execution of lpq...
12:24:59.978612 10.10.10.11.1521 > 10.10.10.2.53: 49595+ PTR?
2.10.10.10.in-addr.arpa. (41)
12:24:59.980065 10.10.10.2.53 > 10.10.10.11.1521: 49595* 1/2/2 PTR
belial.tams. (155)
12:25:00.173096 10.10.10.11.1522 > 10.10.10.2.53: 49597+ A? . (17)
12:25:00.174499 10.10.10.2.53 > 10.10.10.11.1522: 49597 0/1/0 (90)
12:25:00.354756 10.10.10.11.1523 > 10.10.10.2.53: 49599+ A? . (17)
12:25:00.356600 10.10.10.2.53 > 10.10.10.11.1523: 49599 0/1/0 (90)
12:25:00.416715 10.10.10.11.1524 > 10.10.10.2.53: 49601+ A? . (17)
12:25:00.418208 10.10.10.2.53 > 10.10.10.11.1524: 49601 0/1/0 (90)
Which seems odd. lpd is looking up the hostname of the machine that
connects to it (as I would expect) then does 3 consecutive *successful*
lookups on the address '.'
I did a bit of reading in 'man resolver' and find this interesting snippet.
domain Local domain name. Most queries for names within this domain
can use short names relative to the local domain. If no
domain
entry is present, the domain is determined from the local host
name returned by gethostname(2); the domain part is taken to
be
everything after the first `.'. Finally, if the host name does
not contain a domain part, the root domain is assumed.
Interesting... 'hostname' on gorgrael returns 'gorgrael' and I did not have
the 'domain' entry in /etc/resolv.conf, so I thought I had found the
problem. Changed the hostname to gorgrael.tams and also set the 'domain'
parameter in resolv.conf. Unfortunately, it still exhibits identical
behaviour.
I have even gone so far as to look at the source code for lpd (it's a
surprisingly small piece of code) and AFAICT there is only one call made to
gethostbyaddr() for any one connection from a host.
I still think the problem is somewhere in the resolver, but I can't quite
put my finger on it. What could be causing it to do multiple lookups on the
root address?
Cheers
Michael the Confused
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.
More information about the General
mailing list