procmail
[Top] [All Lists]

Re: How to match IP's

2001-09-08 14:05:43
David always seems to know when I get it wrong.

And therein lies the problem.  If the first octet of the higher range
boundary or of the IP to be tested is 128 or greater, procmail's
scoring can't handle the expanded value.

Gah!  I hate it when I make those kind of mistakes.

We can divide everything by two and it's then OK.  And that's alright
because it can't be a /32 address block *and* be an address range - it
needs to be at least a /31.  But that's just a layer of complication on
top of something that's already too complicated.

Alternatively, we could test the octets one at a time: it can get
complicated, though, when the range's endpoints are in the middles of
octet ranges.

Whilst complicated, that's at least saner than my suggestion.

Martin
-- 
Martin McCarthy                 /</                  PGP key available
    `Procmail Companion'        \>\  http://www.ancient-scotland.co.uk
     Addison Wesley             /</    http://www.ehabitat.demon.co.uk
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>