You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "David Tarr (Jira)" <ji...@apache.org> on 2019/11/25 11:19:00 UTC
[jira] [Created] (NET-675) SubnetUtils/SubnetInfo does not compute
range for /32 subnet
David Tarr created NET-675:
------------------------------
Summary: SubnetUtils/SubnetInfo does not compute range for /32 subnet
Key: NET-675
URL: https://issues.apache.org/jira/browse/NET-675
Project: Commons Net
Issue Type: Bug
Affects Versions: 3.6
Reporter: David Tarr
If a SubnetUtils is created using a cidr notation of a single ip-address, the isInRange returns false for the ip-address.
Example code:
{code:java}
String subnet = "192.168.0.15/32";
SubnetUtils subnetUtils = new SubnetUtils(subnet);
SubnetInfo info = subnetUtils.getInfo();
log.debug("{}", info); // first and last ip-address are 0.0.0.0
log.debug("{}", info.isInRange("192.168.0.15")); // false is returned, I would expect true
log.debug("{}", subnetInfo.getAddress())); // the exact address is returned
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)