more problems with /etc/htable

craig at BBN-LABS-B.ARPA craig at BBN-LABS-B.ARPA
Tue Aug 7 07:25:36 AEST 1984


From:  Craig Partridge <craig at BBN-LABS-B.ARPA>


	I just had cause to delve into the htable source again and
tripped over several apparent bugs/misfeatures handling gateways.
I'd post a fix except that we don't use "routed" and therefore
don't care what the "gateways" file looks like.  I was just out
to fix problem #4, which can be solved simply without fixed the
production of the "gateways".  I'm posting this on the grounds
that someone else may be having problems that these notes
explain.

	1.  htable only recognizes gateways that are connected
	to net 10.  All others are skipped. (See htable.c around
	line 150 -- comparison with INTERNET).

	2.  htable suppresses duplicate gateways to the same net.
	(i.e. there can be only one gateway to each network.)
	Duplicate gateways are not listed in either "gateways"
	or "hosts".  This is a surprising feature if not a bug.

	3.  there is a loop to find out which networks a gateway
	is attached to, which doesn't work properly.  The code (c. line 155)

	    for (count = 0, al = al->addr_link; al; al = al->addr_link) {

	fairly clearly should be

	    for (count = 0, al = addrlist; al ; al = al->addr_link) {

	the result of the present line is that some nets may
	be lost.

	4.  htable only recognizes one name for a gateway, the
	first one listed.  All others are suppressed.  (This
	assumes that the gateways has gotten through test 3).


Craig Partridge
craig at bbn-unix
{ihnp4,wjh12,{and others}}!bbncca!craig



More information about the Comp.unix.wizards mailing list