Use Domain In Hostname Or Not?

Mark Sausville saus at media-lab.media.mit.edu
Thu Feb 22 05:06:46 AEST 1990


There are host of bugs in Ultrix which caused by inconsistent uses
and assumptions about hostnames.  Many seem indeed to be caused
by insufficient buffer space to hold the fully qualified domain
name.

One I ran across the other day was in /etc/dms.  The line

SERVER=`/usr/ucb/netstat -i |grep $device |egrep -v "af12|DECnet" | awk '{print $4}'`

is used during some checks which figure out what network the client
and server share.

<#6 hub:/u/saus>netstat -i
Name  Mtu   Network     Address            Ipkts Ierrs    Opkts Oerrs  Coll
scs0  8444  amt-hsc     ci-hub.media.mi   787619     0   784094     0     0
ni0   1500  amt-net     hub.media.mit.e 19501287     0 23738036     0     0
xna0  1500  amt-garden2 exahub.media.mi    91730     0   142740     0     0
lo0   1536  127         LOCALHOST             62     0       62     0     0

/usr/ucb/netstat -i doesn't have enough room to print the whole
hostname in it's 4th field so /etc/dms reports that the host can't be
found on the net because it checks using a truncated version of the
domain name.  Very annoying.

My workaround was to fish out the host part of the domain name and use
that for the check.  Not guaranteed to work under all circumstances
(such as a real long hostname (i.e.
asdfasdfasdfasdfasdfasdfasdfasdfasdfasdf.foo.com).

It's ironic because there's a lot of code dedicated to seeing that
things are done properly and then there's this really gross bug.

It would be nice if this sort of problem just went away sometime soon.

					Regards,
						Mark.
Mark Sausville                           MIT Media Laboratory
Computer Systems Administrator           Room E15-354
617-253-0325                             20 Ames Street
saus at media-lab.media.mit.edu             Cambridge, MA 02139



More information about the Comp.unix.ultrix mailing list