Subject: Re: strange appletalk behavior
To: None <tech-net@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-net
Date: 06/16/1999 16:56:11
On Tue, Jun 15, 1999 at 05:06:11PM +0200, Manuel Bouyer wrote:
> Hi,
> I played a bit with appletalk today, and found an interesting thing:
> the local network is range 34060-34069. When I first started atalkd
> it got address 34068.158. The router (a winNT box) has address
> 34066.164.
> In the routing table, I had:
> AppleTalk:
> Destination        Gateway            Flags     Refs     Use    Mtu  Interface
> 0.0                0.0                U           0        6      -  lo0
> 34060-34063.0      34068.158          U           0        0      -  de0
> 34064-34067.0      34068.158          U           1        2      -  de0
> 34068-34069.0      34068.158          U           0        7      -  de0
> 34068.158          0.0                UH          0        0      -  lo0
> 

Ok, I think I found the problem.
With 34068.158 as address, an entry in added in the de0's adress list as
34068.158, netmask 0xffff. I checked this, and to be able to properly route
ethertalk I have to setup my box at 34066.xxx, 34067 or 34065 won't work
either, so this is not a matter of 'block'.
The route is rejected in ifa_ifwithnet(), when we look for an interface
though wich the gateway is reacheable.

As pointed out by Paul Goyette, the masck should have been 0xfffe of 34068.158,
and 0xfffc for 34066.xxx. Even with the rigth mask I can't see how this can
work for appletalk, where netmasks don't have much sense.
Any idea on how to fix ? I think this 'addr in addr range' check should be
moved to a per-family routine, called from various places which need it.
Comments ?

--
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
--