From issues-return-7128-apmail-commons-issues-archive=commons.apache.org@commons.apache.org Tue Mar 10 16:29:20 2009 Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 47553 invoked from network); 10 Mar 2009 16:29:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 10 Mar 2009 16:29:19 -0000 Received: (qmail 35472 invoked by uid 500); 10 Mar 2009 16:29:12 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 35405 invoked by uid 500); 10 Mar 2009 16:29:12 -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 35353 invoked by uid 99); 10 Mar 2009 16:29:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Mar 2009 09:29:11 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Mar 2009 16:29:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 7D505234C004 for ; Tue, 10 Mar 2009 09:28:50 -0700 (PDT) Message-ID: <1631536898.1236702530505.JavaMail.jira@brutus> Date: Tue, 10 Mar 2009 09:28:50 -0700 (PDT) From: "Sebb (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (NET-262) SubnetUtils does not handle /31 and /32 CIDRs well In-Reply-To: <2124329039.1236699414114.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/NET-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680524#action_12680524 ] Sebb commented on NET-262: -------------------------- Also does not handle /0 properly - getAddressCount() returns a negative number, as the number is higher than Integer.MAXINT. /0 should perhaps be rejected as Illegal? > 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 > > 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.