Subject: Re: net/if.c fix for netatalk
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Christian E. Hopps <chopps@merit.edu>
List: tech-net
Date: 07/01/1999 19:28:18
Manuel Bouyer <bouyer@antioche.lip6.fr> writes:
> Netatalk uses net ranges instead, where a physical network is designed by
> a pair of low net/higth net (this is also why netatalk may use several
> routing table entries for a physical link, to convert this low net/higth net
> into a successtion of addr/netmask).
[...]
> So I fixed ifa_ifwithnet(), and for that I needed to add netatalk-specific
> code (In fact if we are looking for a netatalk interface just use
> at_ifawithnet() which does the rigth thing).
> 
> Diffs are attached. Does anyone object to this change ?
> The only problem I can see is that if.c has now protocol-dependant sections,
> but I don't see how to fix it better.

Well instead of adding N routes when the interface net ranges is
configured why not add N ifaddrs?  These would then turn into your
routes and the if_withnet would work.  While this may seem gross its at
least consistent, and perhaps less gross than adding netatalk specific
things into the generic code. 

The other suggestion I have would be to add a protocol or ifnet specific
match function which if_withnet could use to locate the ifaddr.

(P.S. I have never looked at the netatalk code so please forgive me if
the first suggestion is a dumb :)

Chris.