Brian J. Murrell wrote:
> On Thu, 2007-12-20 at 12:31 -0800, Tom Eastep wrote: 
>> Ok -- you can probably make the obvious change to in_network(), replacing
>> the '-eq' with '='.
> 
> Ahhh.  The subtle difference between -gt and =.  :-)
> 
>> That will take care of the immediate problem but, as you point out, there
>> are other cases in the code where addresses are compared numerically for
>> other than equality. Unfortunately, the arguments to the test are usually
>> calculated using the value returned by decodeaddr().
> 
> Right.  I guess I was proposing "test/[" comparisons be replaced by (a)
> function(s) that hid the ugly details of this mess.
> 
> i.e. though shall not compare address with test/[ but shall used the
> defined functions for doing address comparisons.

Yes -- but that function can blow up the first time that it tries to touch
its arguments in a numeric context. So it would have to break them into two
smaller integers without using arithmetic and without the benefit of
${foo:a:b} (these toy shells don't support that form of expansion).

That will be ugly and slow.

-Tom
-- 
Tom Eastep    \ Nothing is foolproof to a sufficiently talented fool
Shoreline,     \ http://shorewall.net
Washington USA  \ [EMAIL PROTECTED]
PGP Public Key   \ https://lists.shorewall.net/teastep.pgp.key

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Shorewall-users mailing list
Shorewall-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to