Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6F70B10766 for ; Wed, 19 Mar 2014 20:55:46 +0000 (UTC) Received: (qmail 82480 invoked by uid 500); 19 Mar 2014 20:55:43 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 82388 invoked by uid 500); 19 Mar 2014 20:55:43 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 82377 invoked by uid 99); 19 Mar 2014 20:55:43 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Mar 2014 20:55:43 +0000 Date: Wed, 19 Mar 2014 20:55:43 +0000 (UTC) From: "Putinas Piliponis (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (NET-511) Exception for new SubnetUtils("0.0.0.0/0") MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/NET-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13940972#comment-13940972 ] Putinas Piliponis commented on NET-511: --------------------------------------- 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)