Re: File-based net lists

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Bob Green
Fecha:  
A: exim-users, Brian Blackmore
Asunto: Re: File-based net lists
On May 14, 9:29am, Nigel Metheringham wrote:
> Subject: Re: File-based net lists
>
> Stuff deleted...
>
> Basically to do this right using this method you need to do a lookup start
> with address/32 and working up through (address&netmask/32)/32 to
> (address&netmask/0)/0 if you understand my pretty lousy notation. Thats
> 32 lookups for a fail!


It is even worse than that. Don't forget IPV6 which implies 128 lookups for a
fail.

>
> [you need to search from most specific to least specific - ie widest to
> smallest netmask) to make sure that more specific rules hit first]
>


Certainly this should be the default behaviour. In the case of a router (IP,
not exim) that's the only behaviour you want. I can't think why you might need
a different behaviour in exim, but that's probably because I'm pretty new to
exim. If we're looking at a general mechanism of looking up networks in files,
should we try to be as flexible as possible. Should we think about a lookup
that returns all netmasks that match as a list for example?

This is essentially a problem of non-unique keys. A single IP address can match
more than one network/mask. Are there other cases of this elsewhere in exim or
are database lookups built on the assumption that keys are unique?

> Unfortunately binary searches do not work well due to the way that the
> netmask width can be anything you want!
>
> More stuff deleted...
>
>     Nigel.
> --
> [ Nigel.Metheringham@???   -  Systems Software Engineer ]
> [ Tel : +44 113 251 6012                   Fax : +44 113 224 0003 ]
> [            Friends don't let friends use sendmail!              ]

>
>


-Bob
>-- End of excerpt from Nigel Metheringham




--
| Bob Green                                        bob@???
|     SGS-Thomson Microelectronics Ltd,         or bob@???
|     Bristol, UK.  +44 1454 611369        or even bob.green@???

|
| PGP Information:
| KeyID 13A566E5, fingerprint DB 97 A7 77 B2 E3 03 32 E5 34 3D 5B 4E EF 37 F5