Brian J. Murrell wrote:
> On Thu, 2007-12-20 at 11:11 -0800, Tom Eastep wrote:
>> The attached patch should work around the problem.
>
>> - test $(( $(decodeaddr $1) & $netmask)) -eq $(( $(decodeaddr ${2%/*}) &
>> $netmask ))
>> + [ $(( $(decodeaddr $1) & $netmask)) -eq $(( $(decodeaddr ${2%/*}) &
>> $netmask )) ]
>> }
>
> Hrm. Given:
>
> BusyBox v1.8.2 (2007-12-11 14:13:35 EST) built-in shell (ash)
> Enter 'help' for a list of built-in commands.
>
> # test $(shorewall-lite ipdecimal 176.16.0.0) -gt 0
> sh: 2953838592: out of range
> # [ $(shorewall-lite ipdecimal 176.16.0.0) -gt 0 ]
> sh: 2953838592: out of range
> # ls -l /usr/bin/[
> lrwxrwxrwx 1 wasroot root 17 Dec 31 1999 /usr/bin/[ ->
> ../../bin/busybox
>
> Am I missing something?
> I must be missing something -- you specifically tested that number in a "[ -eq ]". So what does this do? foo=2953838592 [ $foo -eq 0 ] If that gives you the 'out of range' error, then try this: eval [ $foo -eq 0 ] -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
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 [email protected] https://lists.sourceforge.net/lists/listinfo/shorewall-users
