[
https://issues.apache.org/jira/browse/NET-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sebb reopened NET-262:
----------------------
Javadoc for the constructor SubnetUtils(String cidrNotation) does not document
the min and max /mask bits
Nor does the other constructor document the min/max IP addresses for mask.
Should add @throws annotation to Javadoc of both constructors say what is
thrown if the input parameters are not in range.
Also SubnetUtilsTest needs to check that out of range masks are rejected, as
well as invalid IP addresses.
> SubnetUtils does not handle /31 and /32 CIDRs well
> --------------------------------------------------
>
> Key: NET-262
> URL: https://issues.apache.org/jira/browse/NET-262
> Project: Commons Net
> Issue Type: Bug
> Affects Versions: 2.0
> Reporter: Sebb
> Fix For: 2.1
>
>
> SubnetUtils does not handle /31 and /32 CIDRs well.
> This should be documented and/or fixed.
> 192.168.0.1/32 causes an IllegalArgumentException to be thrown (by the way,
> that should show the upper and lower bounds)
> 192.168.0.3/31 gives
> addressCount=0,
> low =192.168.0.3
> high=192.168.0.2
> and 192.168.0.3 is rejected as not in range
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.