[ 
https://issues.apache.org/jira/browse/NET-236?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rory Winston closed NET-236.
----------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

> method SubnetUtils.SubnetInfo.isInRange(addr) returns incorrect result
> ----------------------------------------------------------------------
>
>                 Key: NET-236
>                 URL: https://issues.apache.org/jira/browse/NET-236
>             Project: Commons Net
>          Issue Type: Bug
>    Affects Versions: 2.0
>            Reporter: Pasha Arājums
>             Fix For: 2.1
>
>
> current implementation failing to check low limit:
> {code}
> private boolean isInRange(int address)      { return ((address-low()) <= 
> (high()-low())); }
> {code}
> suggested fix:
> {code}
> private boolean isInRange(int address)      { 
>     normal = address-low();
>     return (normal>=0 && (normal <= (high()-low())));
> }
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to