[
https://issues.apache.org/jira/browse/NET-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940972#comment-13940972
]
Sebb edited comment on NET-511 at 3/22/14 1:33 AM:
---------------------------------------------------
Patch is not correct. CIDR /0 is valid with any IP address.
{code}
+ if (cidrPart == 0 && address != 0) {
+ throw new IllegalArgumentException("Cannot have /0 cidr with
non-zero address");
+ }
{code}
was (Author: lapkritinis):
Patch is not correct. CIDR /0 is valid with any IP address.
+ if (cidrPart == 0 && address != 0) {
+ throw new IllegalArgumentException("Cannot have /0 cidr with
non-zero address");
+ }
> Exception for new SubnetUtils("0.0.0.0/0")
> ------------------------------------------
>
> Key: NET-511
> URL: https://issues.apache.org/jira/browse/NET-511
> Project: Commons Net
> Issue Type: Bug
> Affects Versions: 3.3
> Reporter: Kyriacos Elia
> Priority: Minor
> Fix For: 3.4
>
> Attachments: permit_all_ips_cidr.patch
>
>
> The following example in SubnetUtils throws an exception:
> {code:java}
> SubnetUtils utils = new SubnetUtils("0.0.0.0/0");
> {code}
> As '0.0.0.0/0' is within the IPv4 specification, it should be supported.
--
This message was sent by Atlassian JIRA
(v6.2#6252)