Date: Tue, 11 Jun 1996 20:55:46 GMT From: rhh@ct.picker.com To: FreeBSD-gnats-submit@freebsd.org, rhh@ct.picker.com Subject: bin/1312: automounter hangs on boot Message-ID: <199606112055.UAA00705@stealth.ct.picker.com> Resent-Message-ID: <199606120110.SAA12650@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 1312
>Category: bin
>Synopsis: automounter hangs on boot
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jun 11 18:10:02 PDT 1996
>Last-Modified:
>Originator: Randall Hopper
>Organization:
Self
>Release: FreeBSD 2.1-STABLE i386
>Environment:
2.1.0-STABLE with dial-up SLIP connection to corporate intranet
where DNS server lives. SLIP link is not up all the time.
>Description:
I believe I've found a possible bug in the way netmasks are computed
in amd. The bug in question causes a few spurious DNS lookups
which, on my dial-up subnet, hangs the machine for a while during boot
while the DNS requests issued by amd time out. The bug and the workarounds
I've found are detailed below.
>How-To-Repeat:
The specific network setup I'm working with is:
Subnet Mask : 255.255.255.240 (4-bit hostids)
Router Host elmer : 144.54.61.1, 144.54.61,17 (3 interfaces)
Host stealth : 144.54.61.10 (interface 1)
Host voyager : 144.54.61.18 (interface 2)
Dial-up host (interface 3)
I have the following entry in /etc/networks on all machines:
net1 144.54.61.0
net2 144.54.61.16
elmer is a router to several subnets. stealth is on "net1" and voyager is
on "net2".
However, when I start amd on stealth, it does a getnetbyaddr on the
network "0.144.54.61", which it "doesn't" find in the file, so it falls
back and and does a gethostbyaddr on 144.54.61.0. This results in two PTR?
queries which also fail or time out (depending on whether the dial-up link
is up or not).
>Fix:
WORKAROUNDS:
One work-around for now is to just put a (seemingly) bogus net1 entry
in /etc/networks:
net1 144.54.61
net2 144.54.61.16
Another is to just "ifconfig down" the route to the DNS server on subnet
machines while they're bringing up amd.
THE FIX:
The underlying problem seems to be that wire.c:getwire() in the amd
source doesn't determine "mask" correctly when the number of bits in the
hostid isn't 8. For Class B addresses, it starts with the 0xFFFF0000
netmask and increases that 8 bits at a time (?why?). It computes this mask
from the subnet (?), and then applies it TO the subnet. In net1's case
above it ends up with a 0xFFFFFFFF mask and in "net2"'s case it ends up
with a 0xFFFFFF00 mask.
I don't know whether this is a bug, or correct (albeit strange)
behavior documented in an RFC somewhere. To compute "mask", why not start
with the raw subnet "mask" (as opposed to subnet address), and shift it
right 8 bits so long as the low 8 bits are 0?
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606112055.UAA00705>
