robert@SPAM.ISTC.SRI.COM (Robert Allen) (01/06/89)
While testing gated over a synchronous serial link running HDLC
between a Sun 3/75 (running SunOS 3.4) and an HP 330 (running HP-UX 6.01),
I've discovered what appears to be a bug in the program "route" on the
Sun. I'm hoping that somone can authoritativly confirm or deny that this
is a bug, and help me with my dilemma.
Here is the hardware situation
------------------------------
HP 330 sync serial line Sun 3/75
hdlc0 = 192.100.1.1 <========================> zss0 = 192.100.1.2
On the HP I type "add route 192.100.1.0 192.100.1.1 0". The result
I get from a netstat -r -n is "192.100.1 192.100.1.1 U"
On the Sun I type "add route 192.100.1.0 192.100.1.2 0". The result
I get from a netstat -r -n is "192.100.1 192.100.1.2 UH". Note that
the route is shown as being a HOST route, not a network route. This is
wrong.
In order to try and figure out why this was happening, I took the src
to route.c on the Sun (sccsid = 1.1 86/02/05 SMI, from UCB 4.8 83/08/21)
which we have, and put in some printf statements. Note that I believe
this src may be for 3.2, not 3.4 which I'm running on my Sun.
I discovered several things which surprised me:
(1) gethostbyname() now seems to take decimal dot notation in addition
to human-readable names.
(2) using the a.out (on the Sun) created by compiling my `instrumented'
route.c file, I can execute the "route add" command mentioned above and
end up with a network route ("192.100.1 192.100.1.1 U") as I desire and
expect. This route can also be deleted by using the a.out.
(3) The correct network route added on the Sun via a.out, CANNOT be
removed by the route command, returning a "not in table" diagnostic.
The two binaries, route and a.out, do not produce compatible table
entries when given the same input.
After adding the network route on the Sun via a.out and on the HP
via route, I can telnet across the link as I would expect.
This tells me that I either have some bad "route" binaries floating
around, or a bug/feature was introduced in the 3.4 SunOS version of route.
In closing, I have two questions:
(1) why does gethostbyname take decimal dot notation now in addition to
names (is it because we're using yellow pages?)?
(2) Why is the route binary behaving differently, and erroneously at
that, than a binary compiled from the src?
Thanks in advance for any help,
Robert Allen
robert@spam.istc.sri.com
415-859-2143